Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace StupidPasswordGenerator
- {
- class StupidPasswordGenerator
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int L = int.Parse(Console.ReadLine());
- for (int firstNum = 1; firstNum < n; firstNum++)
- {
- for (int secondNum = 1; secondNum < n; secondNum++)
- {
- for (char firstLetter = 'a'; firstLetter < 'a' + L; firstLetter++)
- {
- for (char secondLetter = 'a'; secondLetter < 'a' + L; secondLetter++)
- {
- for (int lastNum = Math.Max(firstNum, secondNum) + 1; lastNum <= n; lastNum++)
- {
- Console.Write($"{firstNum}{secondNum}{firstLetter}{secondLetter}{lastNum} ");
- }
- }
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment