結果

問題 No.1972 Modulo Set
ユーザー gr1msl3y
提出日時 2022-06-11 01:03:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 176 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 81,976 KB
実行使用メモリ 117,024 KB
最終ジャッジ日時 2024-09-21 08:16:26
合計ジャッジ時間 3,980 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 5 WA * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
A=list(map(int,input().split()))
S=set()
ans=0
for a in A:
    v=a%M
    if v in S: continue
    ans+=1
    S.add(v)
    S.add((M-v)%M)
print(ans)
0