結果
| 問題 |
No.1343 Dividing Digit
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-25 14:59:51 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 181 bytes |
| コンパイル時間 | 139 ms |
| コンパイル使用メモリ | 82,088 KB |
| 実行使用メモリ | 96,240 KB |
| 最終ジャッジ日時 | 2024-07-02 13:23:28 |
| 合計ジャッジ時間 | 4,322 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 21 |
ソースコード
N, K = map(int, input().split())
A = list(map(int, input().split()))
res = 0
num = 1
for a in reversed(A):
res = (res + a * num) % sum(A)
num = (num * K) % sum(A)
print(res)