結果

問題 No.804 野菜が苦手
ユーザー キョウチク
提出日時 2022-05-14 23:33:08
言語 Java
(openjdk 23)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 466 bytes
コンパイル時間 3,776 ms
コンパイル使用メモリ 75,404 KB
実行使用メモリ 54,196 KB
最終ジャッジ日時 2024-07-23 10:43:36
合計ジャッジ時間 7,308 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

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