結果
問題 | No.1032 数数え |
ユーザー | zyxw |
提出日時 | 2021-02-05 10:55:45 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 384 bytes |
コンパイル時間 | 1,076 ms |
コンパイル使用メモリ | 86,804 KB |
実行使用メモリ | 109,136 KB |
最終ジャッジ日時 | 2023-09-14 17:21:34 |
合計ジャッジ時間 | 2,858 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
71,228 KB |
testcase_01 | AC | 74 ms
71,516 KB |
testcase_02 | AC | 73 ms
71,080 KB |
testcase_03 | AC | 74 ms
71,296 KB |
testcase_04 | AC | 71 ms
71,312 KB |
testcase_05 | AC | 72 ms
71,096 KB |
testcase_06 | AC | 72 ms
71,360 KB |
testcase_07 | WA | - |
testcase_08 | AC | 76 ms
71,356 KB |
testcase_09 | WA | - |
testcase_10 | AC | 73 ms
71,356 KB |
testcase_11 | AC | 73 ms
71,308 KB |
testcase_12 | AC | 225 ms
108,716 KB |
ソースコード
N,M=map(int,input().split()) L=sorted(list(map(int,input().split()))) num=1 m=L[0] ans=[0]*(m-1) for i in range(1,N): if L[i]==m: num+=1 if i==N-1: ans.append(num) else: ans.append(num) ans+=[0]*(L[i]-m-1) num=1 m=L[i] for i in range(M): if len(ans)-1>=i: print(i+1,ans[i]) else: print(i+1,0)