Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace SETS_AND_DICTIONARIES_ADVANCED
- {
- class Program
- {
- static void Main(string[] args)
- {
- Dictionary<int, int> dict = new Dictionary<int, int>();
- int n = int.Parse(Console.ReadLine());
- for (int i = 0; i < n; i++)
- {
- int curr = int.Parse(Console.ReadLine());
- if (!dict.ContainsKey(curr))
- {
- dict[curr] = 0;
- }
- dict[curr]++;
- }
- foreach (var kvp in dict)
- {
- if (kvp.Value % 2 == 0)
- {
- Console.WriteLine(kvp.Key);
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement