結果

問題 No.2394 部分和乗総和
ユーザー miho-4miho-4
提出日時 2023-12-08 10:56:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 149 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 92,616 KB
最終ジャッジ日時 2023-12-08 10:56:28
合計ジャッジ時間 3,160 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,332 KB
testcase_01 WA -
testcase_02 AC 37 ms
53,332 KB
testcase_03 WA -
testcase_04 AC 38 ms
53,332 KB
testcase_05 AC 34 ms
53,332 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 34 ms
53,332 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 RE -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 144 ms
92,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,base,mod=map(int,input().split())
L=list(map(int,input().split()))
p=0
for e in L:
	p+=e*pow(2,n-1,mod-1)
	p%=mod-1

print((1+pow(base,p,mod))%mod)
0