結果
問題 |
No.45 回転寿司
|
ユーザー |
|
提出日時 | 2018-11-02 11:44:24 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 301 bytes |
コンパイル時間 | 225 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-20 12:55:03 |
合計ジャッジ時間 | 2,568 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 1 WA * 29 |
ソースコード
N = int(input()) sushi = [ int(i) for i in input().split() ] if N == 1: print(sushi[0]) exit() result = 0 i = 0 while i <= N-1: if i == N-1 or sushi[i] >= sushi[i+1]: high = i else: high = i + 1 result += sushi[high] i = high + 2 print(result)