結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー AreTrashAreTrash
提出日時 2016-04-16 08:58:54
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 95 ms / 5,000 ms
コード長 622 bytes
コンパイル時間 2,085 ms
コンパイル使用メモリ 104,840 KB
実行使用メモリ 29,192 KB
最終ジャッジ日時 2023-09-08 14:50:12
合計ジャッジ時間 5,138 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
24,092 KB
testcase_01 AC 94 ms
27,016 KB
testcase_02 AC 61 ms
23,656 KB
testcase_03 AC 61 ms
21,608 KB
testcase_04 AC 61 ms
21,548 KB
testcase_05 AC 95 ms
29,192 KB
testcase_06 AC 61 ms
21,692 KB
testcase_07 AC 61 ms
21,564 KB
testcase_08 AC 61 ms
21,560 KB
testcase_09 AC 61 ms
23,660 KB
testcase_10 AC 62 ms
21,640 KB
testcase_11 AC 61 ms
21,616 KB
testcase_12 AC 61 ms
21,636 KB
testcase_13 AC 62 ms
21,480 KB
testcase_14 AC 85 ms
23,392 KB
testcase_15 AC 75 ms
22,788 KB
testcase_16 AC 88 ms
24,428 KB
testcase_17 AC 74 ms
20,656 KB
testcase_18 AC 87 ms
24,412 KB
testcase_19 AC 82 ms
23,496 KB
testcase_20 AC 94 ms
25,128 KB
testcase_21 AC 70 ms
23,912 KB
testcase_22 AC 77 ms
22,892 KB
testcase_23 AC 91 ms
26,948 KB
testcase_24 AC 92 ms
29,144 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

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]++;

            var max = count.Max();
            for(var i = 6; i >= 1; i--){
                if(count[i] == max){
                    Console.WriteLine(i);
                    break;
                }
            }
        }
    }
}
0