Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace TicketCombination
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- for (char a = 'B'; a <= 'L'; a += 2)
- {
- for (char b = 'f'; b >= 'a'; b--)
- {
- for (char c = 'A'; c <= 'C'; c++)
- {
- for (int d = 1; d <= 10; d++)
- {
- for (int e = 10; e > 0; e--)
- {
- if (--n == 0)
- {
- Console.WriteLine($"Ticket combination: {a}{b}{c}{d}{e}");
- Console.WriteLine($"Prize: {a + b + c + d + e} lv.");
- Environment.Exit(0);
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement