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 _11_DifferentNumber
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = int.Parse(Console.ReadLine());
- int b = int.Parse(Console.ReadLine());
- int n = b - a;
- if (n < 4)
- {
- Console.WriteLine("No");
- }
- else
- {
- for (int i = a; i <= b; i++)
- {
- for (int j = a; j <= b; j++)
- {
- for (int k = a; k <= b; k++)
- {
- for (int l = a; l <= b; l++)
- {
- for (int m = a; m <= b; m++)
- {
- if (i >= j || j >= k || k >= l || l >= m)
- {
- continue;
- }
- else
- {
- int[] array = new int[] { i, j, k, l, m };
- Console.Write(string.Join(" ", array));
- Console.WriteLine();
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment