結果
| 問題 | 
                            No.45 回転寿司
                             | 
                    
| ユーザー | 
                             杉山新
                         | 
                    
| 提出日時 | 2020-07-07 19:00:32 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 223 bytes | 
| コンパイル時間 | 131 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-10-01 15:10:42 | 
| 合計ジャッジ時間 | 2,235 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 RE * 3 | 
| other | RE * 30 | 
ソースコード
N = int(input())
sushi = list(map(int,input().split()))
A = [0]*(N+1)
A[1]=sushi[0]
if N == 1:
    print(sushi[0])
else:
    for i in range(2,N+1):
        A[i] = max(A[i-2],A[i-1]+sushi[i-1])
    
    print(sushi[N])
    
            
            
            
        
            
杉山新