結果

問題 No.804 野菜が苦手
コンテスト
ユーザー kohaku_kohaku
提出日時 2019-03-22 21:50:23
言語 Java
(openjdk 23)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 448 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,356 ms
コンパイル使用メモリ 76,784 KB
実行使用メモリ 46,720 KB
最終ジャッジ日時 2025-12-06 14:44:15
合計ジャッジ時間 5,649 ms
ジャッジサーバーID
(参考情報)
judge3 / 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();
        
        int min1 = a;
        int min2 = b/c;
        int min3 = d/(c+1);
        
        int ans = Math.min(min1, Math.min(min2, min3));
        
        System.out.println(ans);
    }
}
0