結果
問題 |
No.1343 Dividing Digit
|
ユーザー |
![]() |
提出日時 | 2021-01-15 16:24:02 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 259 bytes |
コンパイル時間 | 234 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 20,412 KB |
最終ジャッジ日時 | 2024-11-26 06:40:31 |
合計ジャッジ時間 | 3,154 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | WA * 22 |
ソースコード
N, K = map(int, input().split()) assert(1 <= N and N <= 100000) assert(2 <= K and K <= 10000) A = list(map(int, input().split())) A.reverse() mod = sum(A) digit = 1 ans = 0 for x in A: ans += (digit * x) % mod; digit = (digit * K) % mod; print(ans)