結果
| 問題 |
No.79 過小評価ダメ・ゼッタイ
|
| コンテスト | |
| ユーザー |
kou6839
|
| 提出日時 | 2014-11-30 23:51:38 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 561 ms / 5,000 ms |
| コード長 | 532 bytes |
| コンパイル時間 | 2,258 ms |
| コンパイル使用メモリ | 74,172 KB |
| 実行使用メモリ | 59,340 KB |
| 最終ジャッジ日時 | 2024-06-26 07:16:58 |
| 合計ジャッジ時間 | 11,099 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
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);
}
}
kou6839