結果

問題 No.804 野菜が苦手
コンテスト
ユーザー tenten
提出日時 2020-11-12 11:50:47
言語 Java
(openjdk 23)
結果
AC  
実行時間 134 ms / 2,000 ms
コード長 329 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,154 ms
コンパイル使用メモリ 76,792 KB
実行使用メモリ 46,744 KB
最終ジャッジ日時 2025-12-06 14:57:40
合計ジャッジ時間 5,747 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        System.out.println(Math.min(d / (c + 1), Math.min(b / c, a)));
    }
}
0