結果
問題 |
No.1032 数数え
|
ユーザー |
![]() |
提出日時 | 2025-03-20 20:15:38 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 116 ms / 2,000 ms |
コード長 | 366 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 82,556 KB |
実行使用メモリ | 106,908 KB |
最終ジャッジ日時 | 2025-03-20 20:16:04 |
合計ジャッジ時間 | 1,707 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
import sys def main(): n, m = map(int, sys.stdin.readline().split()) l = list(map(int, sys.stdin.readline().split())) count = [0] * (m + 1) # Create an array from 0 to m for x in l: if 1 <= x <= m: count[x] += 1 for i in range(1, m + 1): print(f"{i} {count[i]}") if __name__ == "__main__": main()