結果
問題 |
No.1102 Remnants
|
ユーザー |
![]() |
提出日時 | 2020-07-03 23:19:05 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 275 bytes |
コンパイル時間 | 300 ms |
コンパイル使用メモリ | 82,444 KB |
実行使用メモリ | 848,536 KB |
最終ジャッジ日時 | 2024-09-17 04:55:25 |
合計ジャッジ時間 | 3,167 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 2 MLE * 1 -- * 22 |
ソースコード
MOD = 10**9 + 7 n, k = map(int, input().split()) comb = [1, k+1] for i in range(2, n+1): comb.append(comb[-1] * (k+i) * pow(i, MOD-2, MOD)) a = list(map(int, input().split())) ans = 0 for i, x in enumerate(a): j = n-i-1 ans += comb[i] * comb[j] * x ans %= MOD print(ans)