結果

問題 No.1032 数数え
ユーザー syunsukesyunsuke
提出日時 2020-11-05 23:00:44
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 210 ms / 2,000 ms
コード長 256 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 109,884 KB
最終ジャッジ日時 2023-09-29 17:35:08
合計ジャッジ時間 2,946 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,204 KB
testcase_01 AC 70 ms
71,532 KB
testcase_02 AC 71 ms
71,288 KB
testcase_03 AC 71 ms
71,252 KB
testcase_04 AC 72 ms
71,308 KB
testcase_05 AC 71 ms
71,396 KB
testcase_06 AC 71 ms
71,292 KB
testcase_07 AC 210 ms
109,884 KB
testcase_08 AC 71 ms
71,472 KB
testcase_09 AC 93 ms
77,556 KB
testcase_10 AC 71 ms
71,488 KB
testcase_11 AC 71 ms
71,048 KB
testcase_12 AC 184 ms
105,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
L=list(map(int,input().split()))
D={}
for i in range(N):
    if L[i] not in D:
        D[L[i]]=1
    else:
        D[L[i]]+=1
        
for i in range(1,M+1):
    if i not in D:
        print(i,0)
    else:
        print(i,D[i])
0