Advertisement
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 _01.Danuci
- {
- class Program
- {
- static void Main(string[] args)
- {
- int pinCod = int.Parse(Console.ReadLine());
- int numberOfHash = int.Parse(Console.ReadLine());
- int secretCod = (500 + (pinCod % 1000)) / 10;
- int counterOfHash = 0;
- int cod = 0;
- for (char a = 'a'; a <= 'z'; a++)
- {
- for (char b = 'a'; b <= 'z'; b++)
- {
- for (int c = 0; c <= 9; c++)
- {
- for (char d = 'a'; d <= 'z'; d++)
- {
- cod = (a + b + c) - d;
- if (a != b && (cod == secretCod))
- {
- Console.Write("{0}{1}{2}{3}", a, b, c, d);
- counterOfHash++;
- if(counterOfHash == numberOfHash)
- {
- return;
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement