結果
問題 |
No.797 Noelちゃんとピラミッド
|
ユーザー |
![]() |
提出日時 | 2019-03-15 22:42:54 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 277 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 72,180 KB |
最終ジャッジ日時 | 2024-07-01 21:19:38 |
合計ジャッジ時間 | 10,022 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | TLE * 1 -- * 59 |
ソースコード
from scipy.special import comb n = int(input()) lis = list(map(int,input().split())) num = 0 ans = 0 for i in range(n//2): num = comb(n,i,exact = True) ans += lis[i] * num ans += lis[-(1 + i)] * num ans %= 10 ** 9+7 if len(lis)%2:ans += lis[(n-1)//2] print(ans)