結果

問題 No.797 Noelちゃんとピラミッド
ユーザー O2MT
提出日時 2021-05-22 14:49:45
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 210 bytes
コンパイル時間 146 ms
コンパイル使用メモリ 82,384 KB
実行使用メモリ 67,396 KB
最終ジャッジ日時 2024-10-10 11:31:11
合計ジャッジ時間 5,623 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 60
権限があれば一括ダウンロードができます

ソースコード

diff #

from scipy.special import comb
N = int(input())
A = list(map(int,input().split()))
n = N-1
ans = 0
MOD = 10**9+7
x = 1
for i in range(N):
  ans += A[i]*x
  ans %= MOD
  x = comb(n,i+1,exact=True)%MOD
print(ans)
0