結果
問題 | No.1972 Modulo Set |
ユーザー | minimum |
提出日時 | 2022-06-10 21:26:16 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 248 bytes |
コンパイル時間 | 407 ms |
コンパイル使用メモリ | 81,420 KB |
実行使用メモリ | 686,628 KB |
最終ジャッジ日時 | 2023-10-21 04:50:29 |
合計ジャッジ時間 | 8,012 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 42 ms
57,760 KB |
testcase_01 | AC | 41 ms
53,216 KB |
testcase_02 | AC | 42 ms
53,216 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | AC | 59 ms
66,244 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 63 ms
73,312 KB |
testcase_14 | AC | 63 ms
70,788 KB |
testcase_15 | WA | - |
testcase_16 | AC | 100 ms
94,328 KB |
testcase_17 | AC | 71 ms
76,616 KB |
testcase_18 | AC | 50 ms
61,772 KB |
testcase_19 | AC | 93 ms
91,916 KB |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 91 ms
91,116 KB |
testcase_23 | AC | 203 ms
170,840 KB |
testcase_24 | AC | 173 ms
175,540 KB |
testcase_25 | AC | 200 ms
200,500 KB |
testcase_26 | WA | - |
testcase_27 | AC | 259 ms
219,492 KB |
testcase_28 | MLE | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
ソースコード
from collections import defaultdict N, M = map(int, input().split()) A = list(map(int, input().split())) r = defaultdict(int) for i in range(N): r[A[i] % M] += 1 ans = 0 for i in range(M // 2 + 1): ans += max(r[i], r[M - i]) print(ans)