結果
問題 | No.1343 Dividing Digit |
ユーザー |
![]() |
提出日時 | 2021-01-17 16:22:03 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 305 bytes |
コンパイル時間 | 203 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 141,836 KB |
最終ジャッジ日時 | 2024-11-29 19:39:14 |
合計ジャッジ時間 | 67,405 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | TLE * 22 |
ソースコード
def powf(x,n): if n == 0: return 1 k = 1 while n>1: if n%2 != 0: k *= x x *= x n //= 2 return k*x n,k = map(int,input().split()) a = list(map(int,input().split())) s = sum(a) ans = 0 for i in range(n): ans += a[n-1-i]*powf(k,i) print(ans%s)