結果
問題 |
No.79 過小評価ダメ・ゼッタイ
|
ユーザー |
![]() |
提出日時 | 2016-04-16 08:57:11 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 60 ms / 5,000 ms |
コード長 | 595 bytes |
コンパイル時間 | 954 ms |
コンパイル使用メモリ | 111,452 KB |
実行使用メモリ | 32,324 KB |
最終ジャッジ日時 | 2024-06-26 07:55:05 |
合計ジャッジ時間 | 2,694 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; namespace No79_1{ public class Program{ public static void Main(string[] args){ Console.ReadLine(); var input = Console.ReadLine().Split().ToList().ConvertAll(int.Parse); var count = new int[7]; for(var i = 1; i <= 6; i++) foreach(var x in input) count[x]++; for(var i = 6; i >= 1; i--){ if(count[i] == count.Max()){ Console.WriteLine(i); break; } } } } }