結果
| 問題 | No.1343 Dividing Digit | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-04-24 08:52:19 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 161 bytes | 
| コンパイル時間 | 151 ms | 
| コンパイル使用メモリ | 82,196 KB | 
| 実行使用メモリ | 139,852 KB | 
| 最終ジャッジ日時 | 2024-07-04 09:01:01 | 
| 合計ジャッジ時間 | 4,598 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | TLE * 1 -- * 21 | 
ソースコード
N,K=map(int,input().split())
A=list(map(int,input().split()))
tmp=1
sum_n=0
sum_b=0
for i in A[::-1]:
    sum_n+=tmp*i
    sum_b+=i
    tmp*=K
print(sum_n%sum_b)
            
            
            
        