結果

問題 No.1032 数数え
ユーザー integerinteger
提出日時 2020-05-01 18:30:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 254 ms / 2,000 ms
コード長 301 bytes
コンパイル時間 501 ms
コンパイル使用メモリ 10,564 KB
実行使用メモリ 31,552 KB
最終ジャッジ日時 2023-08-26 01:04:13
合計ジャッジ時間 2,375 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,776 KB
testcase_01 AC 16 ms
7,956 KB
testcase_02 AC 15 ms
7,856 KB
testcase_03 AC 16 ms
7,820 KB
testcase_04 AC 15 ms
7,956 KB
testcase_05 AC 16 ms
7,888 KB
testcase_06 AC 16 ms
7,932 KB
testcase_07 AC 254 ms
31,552 KB
testcase_08 AC 16 ms
7,908 KB
testcase_09 AC 24 ms
8,360 KB
testcase_10 AC 15 ms
7,768 KB
testcase_11 AC 15 ms
7,844 KB
testcase_12 AC 251 ms
28,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    n, m = map(int, input().split())
    ans = [0 for _ in range(m + 1)]
    l = list(map(int, input().split()))
    for i in l:
        if i <= m:
            ans[i] += 1
    for ind, i in enumerate(ans[1:], 1):
        print('{} {}'.format(ind, i))

if __name__ == '__main__':
    main()
0