Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main(string[] args)
- {
- int k = int.Parse(Console.ReadLine());
- int l = int.Parse(Console.ReadLine());
- int m = int.Parse(Console.ReadLine());
- int n = int.Parse(Console.ReadLine());
- int changeCount = 0;
- for (int first = k; first <= 8; first++)
- {
- for (int second = 9; second >= l; second--)
- {
- for (int third = m; third <= 8; third++)
- {
- for (int fourth = 9; fourth >= n; fourth--)
- {
- if (first % 2 == 0 && second % 2 != 0 && third % 2 == 0 && fourth % 2 != 0)
- {
- if (first == third && second == fourth)
- {
- Console.WriteLine("Cannot change the same player.");
- }
- else
- {
- Console.WriteLine($"{first}{second} - {third}{fourth}");
- changeCount++;
- }
- if (changeCount >= 6)
- {
- Environment.Exit(0);
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment