結果
| 問題 |
No.1343 Dividing Digit
|
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2021-03-16 00:19:12 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 68 ms / 2,000 ms |
| コード長 | 166 bytes |
| コンパイル時間 | 288 ms |
| コンパイル使用メモリ | 82,944 KB |
| 実行使用メモリ | 80,384 KB |
| 最終ジャッジ日時 | 2024-11-07 12:55:04 |
| 合計ジャッジ時間 | 2,697 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
N,K=map(int,input().split())
A=list(map(int,input().split()))
A_sum=sum(A)
X=0
power=1
for a in A[::-1]:
X+=a*power
power*=K
power%=A_sum
print(X%A_sum)
Kazun