結果
| 問題 |
No.1343 Dividing Digit
|
| コンテスト | |
| ユーザー |
Kite_kuma
|
| 提出日時 | 2021-01-16 13:09:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 65 ms / 2,000 ms |
| コード長 | 191 bytes |
| コンパイル時間 | 146 ms |
| コンパイル使用メモリ | 81,664 KB |
| 実行使用メモリ | 79,104 KB |
| 最終ジャッジ日時 | 2024-11-27 13:13:35 |
| 合計ジャッジ時間 | 2,276 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 22 |
ソースコード
n, k = map(int, input().split())
a = list(map(int, input().split()))
mod = sum(a)
ans = 0
pw = 1
for c in reversed(a):
ans += pw * c % mod
pw *= k
pw %= mod
print(ans % mod)
Kite_kuma