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 _Substitute
- {
- 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());
- string combination = string.Empty;
- int combinationCount = 0;
- for (int i = k; i <= 8; i++)
- {
- for (int j = 9; j >= l; j--)
- {
- for (int b = m; b <= 8; b++)
- {
- for (int c = 9; c >= n; c--)
- {
- combination = $"{i}{j} - {b}{c}";
- if (i % 2 == 0)
- {
- if (j % 2 != 0)
- {
- if (b % 2 == 0)
- {
- if (c % 2 != 0)
- {
- if (i == b && j == c)
- {
- Console.WriteLine("Cannot change the same player.");
- }
- else
- {
- Console.WriteLine(combination);
- combinationCount += 1;
- }
- if (combinationCount == 6)
- {
- break;
- }
- }
- }
- }
- }
- if (combinationCount == 6)
- {
- break;
- }
- }
- if (combinationCount == 6)
- {
- break;
- }
- }
- if (combinationCount == 6)
- {
- break;
- }
- }
- if (combinationCount == 6)
- {
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement