結果
問題 | No.706 多眼生物の調査 |
ユーザー | Pump0129 |
提出日時 | 2018-07-23 03:43:38 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 283 ms / 2,000 ms |
コード長 | 673 bytes |
コンパイル時間 | 2,150 ms |
コンパイル使用メモリ | 72,304 KB |
実行使用メモリ | 59,372 KB |
最終ジャッジ日時 | 2023-08-27 01:08:00 |
合計ジャッジ時間 | 4,039 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 120 ms
55,932 KB |
testcase_01 | AC | 118 ms
55,664 KB |
testcase_02 | AC | 117 ms
56,004 KB |
testcase_03 | AC | 146 ms
56,032 KB |
testcase_04 | AC | 156 ms
56,156 KB |
testcase_05 | AC | 213 ms
58,604 KB |
testcase_06 | AC | 283 ms
59,372 KB |
testcase_07 | AC | 116 ms
55,632 KB |
ソースコード
package net.ipipip0129.yukicoder.no706; import java.util.Scanner; class Main { public static void main(String[] args) { int[] cnt_list = new int[1001]; Scanner scan = new Scanner(System.in); int num = Integer.parseInt(scan.nextLine()); for (int i = 0; i < num; i++) { cnt_list[scan.nextLine().length() - 2]++; } int max_index = 0; int max_num = 0; for (int i = 0; i < 1001; i++) { if (max_num <= cnt_list[i]) { max_index = i; max_num = cnt_list[i]; } } System.out.println(max_index); } }