Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int[] array = new int[n];
- for (int i = 0; i<n;i++) {
- array[i]=int.Parse(Console.ReadLine());
- }
- bool numbersAreDifferent = true;
- for (int i = 0; i<n;i++) {
- for (int j = i+1;j<n;j++) {
- if (array[i]==array[j]) {
- numbersAreDifferent = false;
- }
- }
- }
- Console.WriteLine(numbersAreDifferent);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement