結果

問題 No.2153 何コーダーが何人?
ユーザー y_ats03y_ats03
提出日時 2023-03-03 16:37:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 430 bytes
コンパイル時間 558 ms
コンパイル使用メモリ 11,832 KB
実行使用メモリ 10,256 KB
最終ジャッジ日時 2023-10-18 01:03:26
合計ジャッジ時間 3,121 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,064 KB
testcase_01 AC 40 ms
10,068 KB
testcase_02 AC 49 ms
10,196 KB
testcase_03 AC 70 ms
10,232 KB
testcase_04 AC 69 ms
10,224 KB
testcase_05 AC 58 ms
10,212 KB
testcase_06 AC 91 ms
10,256 KB
testcase_07 AC 69 ms
10,228 KB
testcase_08 AC 50 ms
10,196 KB
testcase_09 AC 73 ms
10,236 KB
testcase_10 AC 55 ms
10,208 KB
testcase_11 AC 95 ms
10,252 KB
testcase_12 AC 50 ms
10,192 KB
testcase_13 AC 62 ms
10,216 KB
testcase_14 AC 56 ms
10,200 KB
testcase_15 AC 51 ms
10,200 KB
testcase_16 AC 86 ms
10,248 KB
testcase_17 AC 82 ms
10,252 KB
testcase_18 AC 79 ms
10,244 KB
testcase_19 AC 29 ms
10,064 KB
testcase_20 AC 29 ms
10,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
list = [0, 0, 0, 0, 0, 0, 0, 0]
list1 = []
list2 = []
size = 0
for _ in range(n):
    s, cc = input().split()
    c = int(cc)
    fin = 0
    for i in range(size):
        if s == list1[i]:
            list[list2[i]] -= 1
            list2[i] = c
            fin = 1
    if fin == 0:
        list1 = list1 + [s]
        list2 = list2 + [c]
        size += 1
    list[c] += 1
for i in range(8):
    print(list[i])
0