結果
| 問題 | No.45 回転寿司 |
| ユーザー |
JunOnuma
|
| 提出日時 | 2017-05-24 11:52:41 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 157 bytes |
| 記録 | |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 80,284 KB |
| 実行使用メモリ | 81,976 KB |
| 最終ジャッジ日時 | 2026-07-18 13:41:47 |
| 合計ジャッジ時間 | 3,649 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 RE * 1 |
| other | AC * 30 |
ソースコード
n = int(raw_input())
l = map(int, raw_input().split())
ll = [l[0],max(l[0],l[1])]
for i in range(2,n):
ll.append(max(ll[i-1],ll[i-2]+l[i]))
print ll[-1]
JunOnuma