Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Text.RegularExpressions;
- namespace Advanced
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = int.Parse(Console.ReadLine());
- var digits = new Dictionary<int, int>();
- for (int i = 0; i < number; i++)
- {
- int digit = int.Parse(Console.ReadLine());
- if (!digits.ContainsKey(digit))
- {
- digits[digit] = 0;
- }
- digits[digit]++;
- }
- Console.WriteLine(digits.First(x => x.Value % 2 == 0).Key);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement