結果

問題 No.1972 Modulo Set
ユーザー ニックネーム
提出日時 2022-06-10 21:41:00
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 217 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 26,872 KB
最終ジャッジ日時 2024-09-21 06:06:46
合計ジャッジ時間 6,315 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29 RE * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
cnt = [0]*m
for v in map(int, input().split()): cnt[v%m] += 1
ans = 0
for i in range(m//2+1):
    if i*2%m == 0: ans += min(cnt[i], 1)
    else: ans += max(cnt[i], cnt[m-i])
print(ans)
0