Created
June 6, 2017 14:52
-
-
Save ellenia/05f0bfc8b07eaa10512b6454a68f02e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
class Solution { | |
static void Main(String[] args) { | |
int n = Convert.ToInt32(Console.ReadLine()); | |
string[] height_temp = Console.ReadLine().Split(' '); | |
int[] height = Array.ConvertAll(height_temp,Int32.Parse); | |
Console.WriteLine((from x in height where x == height.Max() select x).Count()); | |
/* int tallest = height.Max(); | |
int count = height.Count(c => c == tallest); | |
Console.WriteLine(count);*/ | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment