結果
| 問題 | 
                            No.45 回転寿司
                             | 
                    
| ユーザー | 
                             JunOnuma
                         | 
                    
| 提出日時 | 2017-05-24 11:52:41 | 
| 言語 | Python2  (2.7.18)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 157 bytes | 
| コンパイル時間 | 203 ms | 
| コンパイル使用メモリ | 6,784 KB | 
| 実行使用メモリ | 6,400 KB | 
| 最終ジャッジ日時 | 2024-09-19 16:04:06 | 
| 合計ジャッジ時間 | 1,664 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / 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