結果
| 問題 | No.1972 Modulo Set |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-06-28 18:33:13 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 415 bytes |
| 記録 | |
| コンパイル時間 | 341 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 17,832 KB |
| 最終ジャッジ日時 | 2026-05-15 16:30:02 |
| 合計ジャッジ時間 | 8,281 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 3 TLE * 1 -- * 30 |
ソースコード
n,m=list(map(int,input().split()))
seq=list(map(int,input().split()))
cnt=0
for i in range(len(seq)):
seq[i]=seq[i]%m
if seq.count(0)>0:
cnt+=1
if m%2==0:
if seq.count(int(m/2)): cnt+=1
for i in range(1,int(m/2)):
cnt+=max(seq.count(i),seq.count(m-i))
else:
for i in range(1,int((m-1)/2)+1):
cnt+=max(seq.count(i),seq.count(m-i))
print(cnt)