結果

問題 No.804 野菜が苦手
コンテスト
ユーザー heyanxx
提出日時 2019-07-09 16:42:44
言語 Java
(openjdk 23)
結果
AC  
実行時間 64 ms / 2,000 ms
コード長 777 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,489 ms
コンパイル使用メモリ 76,536 KB
実行使用メモリ 43,680 KB
最終ジャッジ日時 2025-12-06 14:50:58
合計ジャッジ時間 5,721 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

package test.demo;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Yukicoder804 {

	public static void main(String[] args) throws IOException {
		// TODO 自動生成されたメソッド・スタブ
		String[] str=input();
		int A=Integer.parseInt(str[0]);
		int B=Integer.parseInt(str[1]);
		int C=Integer.parseInt(str[2]);
		int D=Integer.parseInt(str[3]);
		int eatA=0;
		

			for(int j=1;j<=A&&j*C<=B;j++) {
				if((C+1)*j>D) {
					break;
				}
				eatA=j;
			}
		
		System.out.println(eatA);

	}
	public static  String[] input() throws IOException {
		BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
		
		String str=br.readLine();
		String[]str2=str.split(" ");
		
		return str2;
	}
}
0