Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp7
- {
- class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int l = int.Parse(Console.ReadLine());
- for (int firstElement = 1; firstElement <= n; firstElement++) //първия елемент от паролата -> число от 1 до n
- {
- for (int secondElement = 1; secondElement <= n; secondElement++) //втория елемент от паролата -> число от 1 до n
- {
- for (char thirdElement = 'a'; thirdElement < 'a' + l; thirdElement++) //третия елемент от паролата -> буква от 'а' до 'а' + l
- {
- for (char forthElement = 'a'; forthElement < 'a' + l; forthElement++) //четвъртия елемент от паролата -> буква от 'а' до 'а' + l
- {
- for (int fifthElement = 1; fifthElement <= n; fifthElement++) //петия елемент от паролата -> число от 1 до n
- {
- if (fifthElement > firstElement && fifthElement > secondElement)
- {
- Console.Write($"{firstElement}{secondElement}{thirdElement}{forthElement}{fifthElement} ");
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment