結果

問題 No.804 野菜が苦手
ユーザー キョウチクキョウチク
提出日時 2022-05-14 23:33:08
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 466 bytes
コンパイル時間 4,000 ms
コンパイル使用メモリ 72,576 KB
実行使用メモリ 56,084 KB
最終ジャッジ日時 2023-09-30 16:59:09
合計ジャッジ時間 8,146 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,600 KB
testcase_01 AC 124 ms
55,600 KB
testcase_02 AC 123 ms
55,968 KB
testcase_03 AC 126 ms
56,032 KB
testcase_04 AC 126 ms
55,412 KB
testcase_05 AC 125 ms
55,748 KB
testcase_06 AC 127 ms
55,424 KB
testcase_07 AC 127 ms
55,724 KB
testcase_08 AC 128 ms
55,596 KB
testcase_09 AC 124 ms
55,744 KB
testcase_10 AC 129 ms
55,896 KB
testcase_11 AC 123 ms
55,748 KB
testcase_12 AC 124 ms
55,776 KB
testcase_13 AC 125 ms
55,836 KB
testcase_14 AC 123 ms
55,576 KB
testcase_15 AC 122 ms
56,084 KB
testcase_16 AC 123 ms
55,468 KB
testcase_17 AC 123 ms
56,012 KB
testcase_18 AC 123 ms
56,016 KB
testcase_19 AC 124 ms
55,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
public class Test9 {
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String[] line;
    line=sc.nextLine().split(" ");
    int a=Integer.parseInt(line[0]);
    int b=Integer.parseInt(line[1]);
    int c=Integer.parseInt(line[2]);
    int d=Integer.parseInt(line[3]);
    int eat,tmp;
    eat=a;
    tmp=b/c;
    if(tmp<eat) eat=tmp;
    tmp=d/(1+c);
    if(tmp<eat) eat=tmp;
    System.out.println(eat);
  }
}
0