Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Bank
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = int.Parse(Console.ReadLine());
- int origA = a;
- char b = char.Parse(Console.ReadLine());
- char origB = b;
- char c = char.Parse(Console.ReadLine());
- char origC = c;
- char d = char.Parse(Console.ReadLine());
- char origD = d;
- int e = int.Parse(Console.ReadLine());
- int origE = e;
- int maxValidNumbers = int.Parse(Console.ReadLine());
- while (true)
- {
- if (a % 10 == 2 && e % 10 == 5)
- {
- maxValidNumbers--;
- if (maxValidNumbers <= 0) {
- break;
- }
- }
- e--;
- if(e < 10)
- {
- e = origE;
- d++;
- }
- if (d > 'Z')
- {
- d = origD;
- c++;
- }
- if (c > 'z')
- {
- c = origC;
- b++;
- }
- if (b > 'Z')
- {
- b = origB;
- a++;
- }
- if (a > 99)
- {
- a = origA;
- }
- }
- Console.WriteLine($"{a}{b}{c}{d}{e}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement