結果

問題 No.1032 数数え
ユーザー miya145592miya145592
提出日時 2023-05-18 21:37:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 255 ms / 2,000 ms
コード長 192 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 143,312 KB
最終ジャッジ日時 2023-08-22 12:59:55
合計ジャッジ時間 3,339 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
71,768 KB
testcase_01 AC 95 ms
71,592 KB
testcase_02 AC 92 ms
71,800 KB
testcase_03 AC 95 ms
71,268 KB
testcase_04 AC 94 ms
71,728 KB
testcase_05 AC 95 ms
71,760 KB
testcase_06 AC 94 ms
71,736 KB
testcase_07 AC 255 ms
143,312 KB
testcase_08 AC 94 ms
71,444 KB
testcase_09 AC 120 ms
78,232 KB
testcase_10 AC 98 ms
71,780 KB
testcase_11 AC 96 ms
71,776 KB
testcase_12 AC 237 ms
107,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
N, M = map(int, input().split())
L = list(map(int, input().split()))
D = defaultdict(int)
for l in L:
    D[l]+=1
for i in range(1, M+1):
    print(i, D[i])
0