結果

問題 No.79 過小評価ダメ・ゼッタイ
ユーザー kou6839kou6839
提出日時 2014-11-30 23:51:38
言語 Java21
(openjdk 21)
結果
AC  
実行時間 488 ms / 5,000 ms
コード長 532 bytes
コンパイル時間 1,883 ms
コンパイル使用メモリ 71,256 KB
実行使用メモリ 62,584 KB
最終ジャッジ日時 2023-09-08 14:10:23
合計ジャッジ時間 9,597 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 201 ms
59,288 KB
testcase_01 AC 443 ms
60,092 KB
testcase_02 AC 123 ms
55,808 KB
testcase_03 AC 123 ms
55,984 KB
testcase_04 AC 124 ms
56,048 KB
testcase_05 AC 447 ms
60,492 KB
testcase_06 AC 123 ms
56,076 KB
testcase_07 AC 123 ms
55,408 KB
testcase_08 AC 123 ms
56,216 KB
testcase_09 AC 124 ms
55,872 KB
testcase_10 AC 122 ms
56,304 KB
testcase_11 AC 123 ms
56,440 KB
testcase_12 AC 123 ms
56,180 KB
testcase_13 AC 123 ms
55,612 KB
testcase_14 AC 370 ms
60,064 KB
testcase_15 AC 287 ms
60,208 KB
testcase_16 AC 407 ms
60,412 KB
testcase_17 AC 272 ms
59,816 KB
testcase_18 AC 404 ms
60,580 KB
testcase_19 AC 349 ms
59,828 KB
testcase_20 AC 488 ms
60,520 KB
testcase_21 AC 193 ms
58,516 KB
testcase_22 AC 311 ms
60,100 KB
testcase_23 AC 423 ms
60,444 KB
testcase_24 AC 427 ms
62,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.BigInteger;
import java.util.*;
 
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] ans= new int[7];
        for(int i=0;i<n;i++){
        	int t= sc.nextInt();
        	ans[t]++;
        }
        int anss=0;
        int max=0;
        for(int i=1;i<=6;i++){
        	if(ans[i]>=max) {
        		anss=i;
        		max=ans[i];
        	}
        }
        System.out.println(anss);
    }
}
0