結果

問題 No.1032 数数え
ユーザー ryosuke0825ryosuke0825
提出日時 2020-05-02 03:07:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 318 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 35,556 KB
最終ジャッジ日時 2023-08-26 22:04:23
合計ジャッジ時間 2,096 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,468 KB
testcase_01 AC 17 ms
8,416 KB
testcase_02 AC 17 ms
8,540 KB
testcase_03 AC 17 ms
8,428 KB
testcase_04 AC 18 ms
8,484 KB
testcase_05 AC 18 ms
8,596 KB
testcase_06 AC 17 ms
8,488 KB
testcase_07 AC 318 ms
35,556 KB
testcase_08 AC 17 ms
8,508 KB
testcase_09 AC 28 ms
8,756 KB
testcase_10 AC 17 ms
8,552 KB
testcase_11 AC 18 ms
8,420 KB
testcase_12 AC 277 ms
27,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

N, M = map(int, input().split())
L = list(map(int, input().split()))

c = collections.Counter(L)

for i in range(1, M+1):
    if i in c:
        print(i, c[i])
    else:
        print(i, 0)
0