結果

問題 No.1032 数数え
ユーザー matriematrie
提出日時 2020-12-19 16:49:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 199 ms / 2,000 ms
コード長 172 bytes
コンパイル時間 728 ms
コンパイル使用メモリ 11,656 KB
実行使用メモリ 36,712 KB
最終ジャッジ日時 2023-10-21 09:21:22
合計ジャッジ時間 1,744 ms
ジャッジサーバーID
(参考情報)
judge14 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,040 KB
testcase_01 AC 32 ms
10,040 KB
testcase_02 AC 33 ms
10,040 KB
testcase_03 AC 33 ms
10,040 KB
testcase_04 AC 31 ms
10,040 KB
testcase_05 AC 30 ms
10,040 KB
testcase_06 AC 31 ms
10,040 KB
testcase_07 AC 199 ms
36,712 KB
testcase_08 AC 30 ms
10,044 KB
testcase_09 AC 36 ms
10,968 KB
testcase_10 AC 31 ms
10,056 KB
testcase_11 AC 30 ms
10,040 KB
testcase_12 AC 196 ms
33,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
l=list(map(int,input().split()))
a=[0]*(max(k,max(l))+1)
for i in l: a[i]+=1
b=[str(i)+' '+str(a[i]) for i in range(1,k+1)]
print('\n'.join(b))
0