結果

問題 No.797 Noelちゃんとピラミッド
ユーザー ys
提出日時 2019-03-15 21:52:20
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 313 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 35,096 KB
最終ジャッジ日時 2024-07-01 20:50:01
合計ジャッジ時間 3,962 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other TLE * 1 -- * 59
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
b = []
pre = a[0]
for i in range(1, n):
    b.append(pre + a[i])
    pre = a[i]

for i in range(len(b) - 1):
    c = b.copy()
    tmp = []
    pre = c[0]
    for j in range(1, len(c)):
        tmp.append(pre + c[j])
        pre = c[j]

    b = tmp

print(b[0])
0