結果
| 問題 |
No.1343 Dividing Digit
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-16 16:57:47 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 65 ms / 2,000 ms |
| コード長 | 183 bytes |
| コンパイル時間 | 445 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 80,384 KB |
| 最終ジャッジ日時 | 2024-11-27 20:42:46 |
| 合計ジャッジ時間 | 3,084 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
n,k = map(int,input().split())
a = list(map(int,input().split()))
mod = sum(a)
now = 1
ans = 0
for i in a[::-1]:
ans += now*i
ans %= mod
now *= k
now %= mod
print(ans)