結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-07-25 00:30:48
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 646 bytes
コンパイル時間 1,990 ms
コンパイル使用メモリ 102,028 KB
実行使用メモリ 27,928 KB
最終ジャッジ日時 2023-09-06 04:43:11
合計ジャッジ時間 10,443 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
21,856 KB
testcase_01 AC 701 ms
27,928 KB
testcase_02 AC 79 ms
23,504 KB
testcase_03 AC 79 ms
21,600 KB
testcase_04 AC 78 ms
19,552 KB
testcase_05 AC 686 ms
26,100 KB
testcase_06 AC 56 ms
20,720 KB
testcase_07 AC 55 ms
20,672 KB
testcase_08 AC 79 ms
21,364 KB
testcase_09 WA -
testcase_10 AC 79 ms
21,572 KB
testcase_11 AC 82 ms
21,656 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 428 ms
24,860 KB
testcase_15 AC 215 ms
24,524 KB
testcase_16 AC 535 ms
23,564 KB
testcase_17 AC 205 ms
24,404 KB
testcase_18 AC 518 ms
21,584 KB
testcase_19 AC 397 ms
22,796 KB
testcase_20 AC 718 ms
26,100 KB
testcase_21 AC 95 ms
23,900 KB
testcase_22 AC 273 ms
22,616 KB
testcase_23 AC 648 ms
25,888 KB
testcase_24 AC 671 ms
27,884 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class No79{
    static void Main(){
        var a=Int32.Parse(Console.ReadLine());
        var b=Console.ReadLine().Split(' ');
        Array.Sort(b);
        var c=1;
        var d="0";
        var e=0;
        for(int i=1;i<a;i++){
            if(b[i-1]==b[i]){
                c++;
            }
            else{
                if(e<=c){
                    d=b[i-1];
                    e=c;
                }
                c=1;
                
            } 
            if(e<=c){
                    d=b[i-1];
                    e=c;
            }
        }
        if(a==1)d=b[0];
        Console.WriteLine(d);
    }
}
0