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