結果

問題 No.804 野菜が苦手
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2019-03-22 21:50:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 448 bytes
コンパイル時間 2,296 ms
コンパイル使用メモリ 74,036 KB
実行使用メモリ 57,640 KB
最終ジャッジ日時 2023-10-19 07:49:05
合計ジャッジ時間 6,062 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 140 ms
57,248 KB
testcase_01 AC 139 ms
57,384 KB
testcase_02 AC 137 ms
57,528 KB
testcase_03 AC 142 ms
57,252 KB
testcase_04 AC 141 ms
57,280 KB
testcase_05 AC 138 ms
57,464 KB
testcase_06 AC 137 ms
57,224 KB
testcase_07 AC 139 ms
57,252 KB
testcase_08 AC 141 ms
57,200 KB
testcase_09 AC 138 ms
57,268 KB
testcase_10 AC 137 ms
57,276 KB
testcase_11 AC 136 ms
57,392 KB
testcase_12 AC 135 ms
57,640 KB
testcase_13 AC 142 ms
57,156 KB
testcase_14 AC 138 ms
57,460 KB
testcase_15 AC 141 ms
57,204 KB
testcase_16 AC 136 ms
57,424 KB
testcase_17 AC 136 ms
57,564 KB
testcase_18 AC 141 ms
57,140 KB
testcase_19 AC 141 ms
57,272 KB
権限があれば一括ダウンロードができます

ソースコード

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