結果

問題 No.45 回転寿司
ユーザー Shin09shin
提出日時 2019-01-20 14:26:19
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 346 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 375 ms
コンパイル使用メモリ 20,700 KB
実行使用メモリ 15,496 KB
最終ジャッジ日時 2026-04-04 04:59:12
合計ジャッジ時間 4,977 ms
ジャッジサーバーID
(参考情報)
judge5_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n = int(input())
sq = list(map(int,input().split()))

m1 = 0
m2 = 0
m3 = sq[0]
cnt = 1
while cnt < n:
    print('m1 ' + str(m1))
    print('m2 ' + str(m2))
    print('m3 ' + str(m3))
    print('sq[cnt]' + str(sq[cnt]))
    m4 = max([sq[cnt]+m2, sq[cnt]+m1])
    print('m4 ' + str(m4))
    m1,m2,m3 = m2,m3,m4 
    cnt += 1

print(max([m1,m2,m3]))
0