結果
| 問題 |
No.45 回転寿司
|
| ユーザー |
dashi_dragons
|
| 提出日時 | 2017-02-14 00:24:00 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 393 bytes |
| コンパイル時間 | 325 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 24,648 KB |
| 最終ジャッジ日時 | 2024-12-29 20:55:27 |
| 合計ジャッジ時間 | 175,755 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 2 TLE * 28 |
ソースコード
import sys
def check(a,b,x):
if x < a or x > b:
sys.exit()
def choice(list,i):
if len(list) <= i:
return 0
pick = list[i] + choice(list,i+2)
npick = choice(list,i+1)
if pick > npick:
return pick
else:
return npick
N = int(input())
check(1,1000,N)
list = input().split(' ')
for i in range(0,len(list)):
list[i] = int(list[i])
check(1,100,list[i])
print(choice(list,0))
dashi_dragons