using System; using System.Collections.Generic; using System.IO; class Solution { static void Main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ string strNoOfInputs = Console.ReadLine(); int noOfInputs = 0; if(Int32.TryParse(strNoOfInputs, out noOfInputs)){ string strCandlesHeight = Console.ReadLine(); if(!string.IsNullOrEmpty(strCandlesHeight)){ string [] strArray = strCandlesHeight.Split(new char[] {' '}); int maxHeight = 0; Dictionary candles = new Dictionary(); for(int i=0; i < strArray.Length; i++){ int height = 0; if(Int32.TryParse(strArray[i], out height)){ if (candles.ContainsKey(height)) { candles[height] = candles[height] + 1; } else{ candles[height] = 1; } if(height > maxHeight){ maxHeight = height; } } } Console.WriteLine(candles[maxHeight]); } } } }