結果
問題 | No.2394 部分和乗総和 |
ユーザー |
![]() |
提出日時 | 2023-07-28 21:58:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 212 ms / 2,000 ms |
コード長 | 182 bytes |
コンパイル時間 | 288 ms |
コンパイル使用メモリ | 82,408 KB |
実行使用メモリ | 92,812 KB |
最終ジャッジ日時 | 2024-10-06 18:42:29 |
合計ジャッジ時間 | 2,605 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
from sys import stdin input=lambda :stdin.readline()[:-1] n,m,b=map(int,input().split()) a=list(map(int,input().split())) ans=1 for i in a: ans*=(1+pow(m,i,b)) ans%=b print(ans)