結果
問題 |
No.505 カードの数式2
|
ユーザー |
![]() |
提出日時 | 2018-07-10 23:08:58 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 233 bytes |
コンパイル時間 | 311 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-14 00:15:56 |
合計ジャッジ時間 | 2,329 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 WA * 13 |
ソースコード
N=int(input()) S=input() S=S.rstrip().split(" ") list1=[] for i in range(N): list1.append(int(S[i])) #print(list1) ans=list1[0] for j in range(1,N): list2=[ans+list1[j],ans-list1[j],ans*list1[j]] ans=max(list2) print(ans)