結果
問題 | No.1343 Dividing Digit |
ユーザー |
|
提出日時 | 2021-01-16 13:04:50 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 102 ms / 2,000 ms |
コード長 | 159 bytes |
コンパイル時間 | 372 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 80,128 KB |
最終ジャッジ日時 | 2024-11-27 13:01:27 |
合計ジャッジ時間 | 2,964 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
ソースコード
N,K = map(int,input().split())A = list(map(int,input().split()))A = A[::-1]S = sum(A)res = 0for i in range(N):res += A[i] * pow(K,i,S)print(res%S)