結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-07-25 00:26:40
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 622 bytes
コンパイル時間 3,710 ms
コンパイル使用メモリ 106,344 KB
実行使用メモリ 27,920 KB
最終ジャッジ日時 2023-09-06 04:33:14
合計ジャッジ時間 12,178 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
21,964 KB
testcase_01 AC 702 ms
25,920 KB
testcase_02 AC 78 ms
23,532 KB
testcase_03 AC 78 ms
23,468 KB
testcase_04 AC 78 ms
19,524 KB
testcase_05 AC 682 ms
25,992 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 77 ms
21,480 KB
testcase_09 WA -
testcase_10 AC 77 ms
21,668 KB
testcase_11 AC 80 ms
21,536 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 425 ms
22,916 KB
testcase_15 AC 215 ms
24,384 KB
testcase_16 AC 532 ms
25,756 KB
testcase_17 AC 202 ms
22,408 KB
testcase_18 AC 519 ms
25,452 KB
testcase_19 AC 394 ms
22,776 KB
testcase_20 AC 722 ms
27,920 KB
testcase_21 AC 93 ms
21,808 KB
testcase_22 AC 271 ms
22,644 KB
testcase_23 AC 653 ms
27,860 KB
testcase_24 AC 670 ms
23,824 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;
            }
        }
        Console.WriteLine(d);
    }
}
0