Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Problem2MissCat
- {
- using System;
- using System.Linq;
- class Problem2MissCat
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- int[] cats = new int[10];
- int currentVote = 0;
- for (int i = 0; i < n; i++)
- {
- currentVote = int.Parse(Console.ReadLine());
- switch (currentVote)
- {
- default: cats[currentVote - 1]++;
- break;
- }
- }
- Console.WriteLine(Array.IndexOf(cats, cats.Max()) + 1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement