結果

問題 No.2153 何コーダーが何人?
ユーザー achapiachapi
提出日時 2022-12-09 21:21:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 219 bytes
コンパイル時間 495 ms
コンパイル使用メモリ 86,912 KB
実行使用メモリ 75,340 KB
最終ジャッジ日時 2023-08-04 21:10:35
合計ジャッジ時間 2,972 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
70,944 KB
testcase_01 AC 76 ms
75,272 KB
testcase_02 AC 68 ms
70,972 KB
testcase_03 AC 73 ms
75,000 KB
testcase_04 AC 71 ms
71,112 KB
testcase_05 AC 71 ms
70,936 KB
testcase_06 AC 75 ms
75,116 KB
testcase_07 AC 74 ms
71,084 KB
testcase_08 AC 71 ms
71,132 KB
testcase_09 AC 74 ms
75,340 KB
testcase_10 AC 70 ms
71,056 KB
testcase_11 AC 76 ms
75,196 KB
testcase_12 AC 69 ms
71,284 KB
testcase_13 AC 69 ms
71,068 KB
testcase_14 AC 71 ms
71,088 KB
testcase_15 AC 70 ms
71,236 KB
testcase_16 AC 76 ms
75,112 KB
testcase_17 AC 76 ms
75,132 KB
testcase_18 AC 77 ms
75,064 KB
testcase_19 AC 63 ms
71,200 KB
testcase_20 AC 64 ms
71,092 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
s=[0]*8
d={}
for _ in range(n):
    a,b=input().split()
    if not a in d:
        s[int(b)]+=1
        d[a]=int(b)
    else:
        s[d[a]]-=1
        s[int(b)]+=1
        d[a]=int(b)
print(*s,sep="\n")
0