結果

問題 No.804 野菜が苦手
ユーザー monburan_0401
提出日時 2019-05-04 02:31:02
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,368 KB
最終ジャッジ日時 2025-01-02 21:14:29
合計ジャッジ時間 1,936 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

s = str(input())
s = s.split(" ")

veg = int(s[0])
meat = int(s[1])
times = int(s[2])
max_ = int(s[3])

total = 0

while veg > 0 and meat > 0 and max_ > 0:
    if (1 + times) <= max_ and times <= meat:
        total += 1
        meat -= times
        veg -= 1
        max_ -= (1 + times)
    else:
        veg = 0
        break

print(total)
0