結果
| 問題 |
No.797 Noelちゃんとピラミッド
|
| コンテスト | |
| ユーザー |
mukadenodaiou
|
| 提出日時 | 2019-03-17 23:04:41 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 255 bytes |
| コンパイル時間 | 88 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 25,952 KB |
| 最終ジャッジ日時 | 2024-07-08 01:49:17 |
| 合計ジャッジ時間 | 4,930 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 59 |
ソースコード
import math
def comb(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
MOD = int(1e9+7)
n = int(input())
a = input().split()
ans = 0
for i,j in enumerate(a):
ans += int(j)*comb(n-1, int(i))
ans %= MOD
print(ans)
mukadenodaiou