結果

問題 No.804 野菜が苦手
ユーザー deepjugglingdeepjuggling
提出日時 2023-06-08 07:51:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 63 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 521 ms
コンパイル使用メモリ 87,240 KB
実行使用メモリ 71,656 KB
最終ジャッジ日時 2023-08-28 23:26:00
合計ジャッジ時間 2,571 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
71,108 KB
testcase_01 AC 62 ms
71,388 KB
testcase_02 AC 61 ms
71,388 KB
testcase_03 AC 61 ms
71,468 KB
testcase_04 AC 61 ms
71,344 KB
testcase_05 AC 62 ms
71,356 KB
testcase_06 AC 58 ms
71,568 KB
testcase_07 AC 60 ms
71,436 KB
testcase_08 AC 60 ms
71,568 KB
testcase_09 AC 60 ms
71,264 KB
testcase_10 AC 61 ms
71,392 KB
testcase_11 AC 62 ms
71,568 KB
testcase_12 AC 61 ms
71,116 KB
testcase_13 AC 61 ms
71,396 KB
testcase_14 AC 61 ms
71,316 KB
testcase_15 AC 59 ms
71,388 KB
testcase_16 AC 62 ms
71,656 KB
testcase_17 AC 63 ms
71,388 KB
testcase_18 AC 62 ms
71,132 KB
testcase_19 AC 62 ms
71,464 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b,c,d = map(int,input().split())
if c+1 > d:
    print(0)
    exit()
for i in range(a):
    if d >= c+1:
        d -= c+1
    else:
        print(i)
        exit()
    if b >= c:
        b -= c
    else:
        print(i)
        exit()
print(a)
0