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.Collections;
- namespace _4.OddNumber
- {
- class OddNumber
- {
- static void Main(string[] args)
- {
- SortedDictionary<long, bool> oddTime = new SortedDictionary<long,bool>();
- int n = int.Parse(Console.ReadLine());
- long number;
- for (int i = 0; i < n; i++)
- {
- number = long.Parse(Console.ReadLine());
- if (oddTime.ContainsKey(number))
- {
- oddTime.Remove(number);
- }
- else
- {
- oddTime.Add(number,true);
- }
- }
- Console.WriteLine(oddTime.Max().Key);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement