結果

問題 No.804 野菜が苦手
ユーザー deepjuggling
提出日時 2023-06-08 07:51:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 247 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 52,096 KB
最終ジャッジ日時 2024-12-30 14:28:47
合計ジャッジ時間 2,338 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

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