結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
gma712
|
| 提出日時 | 2018-10-09 01:08:26 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 545 bytes |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-12 16:10:28 |
| 合計ジャッジ時間 | 2,113 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 1 WA * 29 |
ソースコード
#coding:utf-8
def main():
N = int(input())
dishes = list(input().split(' '))
pick_list = pick(N,dishes)
print(sum(pick_list))
def pick(N,dishes):
pick_list = []
i = 0
while i <= N-1:
if i == N-1:
pick_list.append(int(dishes[i]))
i += 1
elif dishes[i] >= dishes[i+1]:
pick_list.append(int(dishes[i]))
i += 2
else:
pick_list.append(int(dishes[i+1]))
i += 3
return pick_list
if __name__ == '__main__':
main()
gma712