結果

問題 No.804 野菜が苦手
ユーザー kohaku_kohaku
提出日時 2019-03-22 21:50:23
言語 Java
(openjdk 23)
結果
AC  
実行時間 140 ms / 2,000 ms
コード長 448 bytes
コンパイル時間 2,498 ms
コンパイル使用メモリ 74,756 KB
実行使用メモリ 41,620 KB
最終ジャッジ日時 2024-09-19 04:06:41
合計ジャッジ時間 6,227 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

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