結果

問題 No.2537 多重含意
ユーザー rlangevin
提出日時 2023-11-10 22:27:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 309 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 82,464 KB
実行使用メモリ 90,556 KB
最終ジャッジ日時 2024-09-26 01:51:14
合計ジャッジ時間 2,799 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *

N, B = map(int, input().split())
A = list(map(int, input().split()))
S = set()
ans1 = pow(2, N, B)
nokori = N
for i, a in enumerate(A):
    if a in S:
        print(ans1)
    else:
        nokori -= 1
        print( (pow(2, i + 1, B) - 1) * pow(2, nokori, B) % B )
    S.add(a)
    
0