結果
問題 |
No.797 Noelちゃんとピラミッド
|
ユーザー |
![]() |
提出日時 | 2019-03-17 23:06:30 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 290 bytes |
コンパイル時間 | 172 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-07-08 01:52:40 |
合計ジャッジ時間 | 3,756 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 60 |
ソースコード
import math def comb(n, r): return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) MOD = int(1e9+7) n = int(input()) combs=[comb(n-1,i) for i in range(i-1)] a = input().split() ans = 0 for i,j in enumerate(a): ans += int(j)*combs[int(i)] ans %= MOD print(ans)