結果

問題 No.505 カードの数式2
ユーザー htkb
提出日時 2017-04-28 21:45:25
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 157 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-09-13 17:54:40
合計ジャッジ時間 2,115 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = [int(s) for s in input().split()]
t = a[0]
for i in a[1:]:
    s = [t+i, t*i, t-i]
    if i!=0:
        s+=[t/i]
    t = max(s)
print(t)
0