結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー abL8ZLsTbFabL8ZLsTbF
提出日時 2016-03-23 01:07:24
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 87 ms / 5,000 ms
コード長 685 bytes
コンパイル時間 2,726 ms
コンパイル使用メモリ 103,508 KB
実行使用メモリ 27,368 KB
最終ジャッジ日時 2023-09-08 14:48:54
合計ジャッジ時間 5,048 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
21,064 KB
testcase_01 AC 86 ms
23,328 KB
testcase_02 AC 57 ms
22,724 KB
testcase_03 AC 56 ms
20,696 KB
testcase_04 AC 56 ms
20,752 KB
testcase_05 AC 87 ms
27,368 KB
testcase_06 AC 57 ms
22,668 KB
testcase_07 AC 55 ms
20,608 KB
testcase_08 AC 56 ms
20,668 KB
testcase_09 AC 57 ms
18,672 KB
testcase_10 AC 58 ms
22,768 KB
testcase_11 AC 58 ms
22,836 KB
testcase_12 AC 58 ms
20,676 KB
testcase_13 AC 57 ms
20,744 KB
testcase_14 AC 77 ms
23,976 KB
testcase_15 AC 69 ms
21,576 KB
testcase_16 AC 80 ms
23,000 KB
testcase_17 AC 69 ms
21,528 KB
testcase_18 AC 80 ms
22,740 KB
testcase_19 AC 76 ms
19,784 KB
testcase_20 AC 86 ms
25,308 KB
testcase_21 AC 65 ms
20,956 KB
testcase_22 AC 72 ms
21,676 KB
testcase_23 AC 86 ms
25,240 KB
testcase_24 AC 87 ms
27,320 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Program {
    public static void Main() {
        int n = int.Parse(Console.ReadLine());
        int[] vote = Array.ConvertAll(Console.ReadLine().Split(), delegate(string value) {
            return int.Parse(value);
        });
        int[] num = new int[6];
        for (int i = 0; i < 6; i++) {
            num[i] = 0;
        }
        foreach (int temp in vote) {
            num[temp-1]++;
        }
        int max = -1;
        int maxIndex = -1;
        for (int i = 0; i < 6; i++) {
            if (max <= num[i]) {
                max = num[i];
                maxIndex = i+1;
            }
        }
        Console.WriteLine(maxIndex);
    }
}
0