結果

問題 No.2153 何コーダーが何人?
ユーザー mo124121mo124121
提出日時 2022-12-02 21:58:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 572 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 82,428 KB
実行使用メモリ 67,328 KB
最終ジャッジ日時 2024-04-18 05:52:32
合計ジャッジ時間 2,271 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
53,632 KB
testcase_01 AC 56 ms
62,464 KB
testcase_02 AC 52 ms
63,104 KB
testcase_03 AC 58 ms
66,036 KB
testcase_04 AC 56 ms
64,896 KB
testcase_05 AC 55 ms
64,000 KB
testcase_06 AC 61 ms
66,176 KB
testcase_07 AC 57 ms
65,280 KB
testcase_08 AC 57 ms
63,232 KB
testcase_09 AC 58 ms
65,664 KB
testcase_10 AC 55 ms
63,744 KB
testcase_11 AC 60 ms
67,328 KB
testcase_12 AC 53 ms
62,336 KB
testcase_13 AC 57 ms
64,512 KB
testcase_14 AC 55 ms
62,976 KB
testcase_15 AC 53 ms
62,720 KB
testcase_16 AC 61 ms
66,816 KB
testcase_17 AC 61 ms
67,072 KB
testcase_18 AC 59 ms
66,176 KB
testcase_19 AC 41 ms
53,760 KB
testcase_20 AC 40 ms
53,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter


def val_N(N):
    if 1 <= N <= 2 * 10**3:
        pass
    else:
        raise Exception


def val_C(C):
    if 0 <= C <= 7:
        pass
    else:
        raise Exception


def val_S(S):
    for c in S:
        if c not in "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ":
            raise Exception


N = int(input())
val_N(N)
count = Counter()
for _ in range(N):
    S, C = input().split()
    C = int(C)
    count[S] = C
    val_S(S)
    val_C(C)

ans = [0] * 8
for v in count.values():
    ans[v] += 1


print(*ans, sep="\n")
0