結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー TDTD
提出日時 2022-06-01 11:41:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 52 ms / 5,000 ms
コード長 844 bytes
コンパイル時間 855 ms
コンパイル使用メモリ 106,488 KB
実行使用メモリ 28,492 KB
最終ジャッジ日時 2023-10-21 00:47:39
合計ジャッジ時間 2,529 ms
ジャッジサーバーID
(参考情報)
judge15 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
24,740 KB
testcase_01 AC 52 ms
28,488 KB
testcase_02 AC 25 ms
24,180 KB
testcase_03 AC 25 ms
24,180 KB
testcase_04 AC 25 ms
24,180 KB
testcase_05 AC 51 ms
28,492 KB
testcase_06 AC 26 ms
24,180 KB
testcase_07 AC 25 ms
24,180 KB
testcase_08 AC 26 ms
24,180 KB
testcase_09 AC 25 ms
24,180 KB
testcase_10 AC 25 ms
24,180 KB
testcase_11 AC 25 ms
24,180 KB
testcase_12 AC 25 ms
24,180 KB
testcase_13 AC 25 ms
24,180 KB
testcase_14 AC 43 ms
25,600 KB
testcase_15 AC 35 ms
25,252 KB
testcase_16 AC 47 ms
26,256 KB
testcase_17 AC 34 ms
25,228 KB
testcase_18 AC 46 ms
26,244 KB
testcase_19 AC 41 ms
25,560 KB
testcase_20 AC 51 ms
28,492 KB
testcase_21 AC 30 ms
24,668 KB
testcase_22 AC 37 ms
25,408 KB
testcase_23 AC 51 ms
28,448 KB
testcase_24 AC 52 ms
28,464 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = int.Parse(Console.ReadLine());
            string[] s = Console.ReadLine().Trim().Split(' ');
            int b;
            int[] c = new int[6];
            int ans = 0;
            int count = 0;
            for (int i = 0; i < a; i++)
            {
                b = int.Parse(s[i]);
                for (int j = 0; j < 6; j++)
                {
                    if (b == j+1)
                    {
                        c[j]++;
                    }
                }
            }
            
            for(int x=0;x<6;x++)
             if (c[x] >= count)
            {
                ans = x;
                count = c[x];
            }
            Console.WriteLine(ans + 1);
        }

    }
}
0