結果
| 問題 |
No.1102 Remnants
|
| コンテスト | |
| ユーザー |
anagohirame
|
| 提出日時 | 2020-07-03 23:53:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 286 bytes |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 81,772 KB |
| 実行使用メモリ | 848,176 KB |
| 最終ジャッジ日時 | 2024-09-17 05:08:52 |
| 合計ジャッジ時間 | 2,879 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 2 MLE * 1 -- * 22 |
ソースコード
MOD = 10**9 + 7 n, k = map(int, input().split()) comb = [1 for _ in range(n+1)] for i in range(1, n): comb[i] = comb[i-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)
anagohirame