結果

問題 No.2153 何コーダーが何人?
ユーザー viral8viral8
提出日時 2022-12-09 21:35:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 234 ms / 2,000 ms
コード長 473 bytes
コンパイル時間 3,260 ms
コンパイル使用メモリ 75,224 KB
実行使用メモリ 43,696 KB
最終ジャッジ日時 2024-04-22 21:02:27
合計ジャッジ時間 8,677 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 148 ms
41,312 KB
testcase_01 AC 202 ms
43,696 KB
testcase_02 AC 211 ms
42,308 KB
testcase_03 AC 223 ms
42,604 KB
testcase_04 AC 219 ms
43,216 KB
testcase_05 AC 221 ms
42,852 KB
testcase_06 AC 229 ms
43,200 KB
testcase_07 AC 219 ms
42,600 KB
testcase_08 AC 211 ms
42,216 KB
testcase_09 AC 224 ms
42,316 KB
testcase_10 AC 218 ms
42,280 KB
testcase_11 AC 231 ms
43,288 KB
testcase_12 AC 219 ms
42,552 KB
testcase_13 AC 220 ms
42,908 KB
testcase_14 AC 215 ms
42,552 KB
testcase_15 AC 213 ms
42,664 KB
testcase_16 AC 233 ms
42,852 KB
testcase_17 AC 234 ms
43,148 KB
testcase_18 AC 231 ms
42,852 KB
testcase_19 AC 146 ms
41,556 KB
testcase_20 AC 152 ms
41,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.HashMap;
class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] count = new int[8];
		HashMap<String,Integer> list = new HashMap<>();
		while(N-->0){
			String name = sc.next();
			int C = sc.nextInt();
			list.put(name,C);
		}
		for(String name:list.keySet()){
			int c = list.get(name);
			count[c]++;
		}
		for(int ans:count)
			System.out.println(ans);
	}
}
0