結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー |
![]() |
提出日時 | 2016-05-14 13:08:57 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 593 ms / 5,000 ms |
コード長 | 456 bytes |
コンパイル時間 | 2,249 ms |
コンパイル使用メモリ | 74,904 KB |
実行使用メモリ | 47,996 KB |
最終ジャッジ日時 | 2024-06-26 07:55:46 |
合計ジャッジ時間 | 11,248 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
import java.util.Scanner; public class Main{ static long mod=(long)10E9; public static void main(String[] args){ Scanner sc=new Scanner(System.in); while(sc.hasNext()){ int n=sc.nextInt(); int[] l=new int[6]; for(int i=0;i<n;i++) l[sc.nextInt()-1]++; int res=0; int max=0; for(int i=0;i<6;i++) if(max<=l[i]){ res=i+1; max=l[i];} System.out.println(res); } } }