結果
| 問題 | No.45 回転寿司 |
| ユーザー |
JunOnuma
|
| 提出日時 | 2017-05-24 11:52:41 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 157 bytes |
| 記録 | |
| コンパイル時間 | 186 ms |
| コンパイル使用メモリ | 77,448 KB |
| 最終ジャッジ日時 | 2025-12-03 23:50:11 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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