結果

問題 No.804 野菜が苦手
ユーザー heyanxxheyanxx
提出日時 2019-07-09 16:34:29
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 773 bytes
コンパイル時間 3,334 ms
コンパイル使用メモリ 73,496 KB
実行使用メモリ 37,348 KB
最終ジャッジ日時 2024-04-20 12:18:09
合計ジャッジ時間 4,379 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
37,076 KB
testcase_01 AC 48 ms
36,720 KB
testcase_02 AC 48 ms
37,224 KB
testcase_03 WA -
testcase_04 AC 50 ms
37,316 KB
testcase_05 AC 50 ms
37,252 KB
testcase_06 WA -
testcase_07 AC 47 ms
37,168 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 47 ms
37,252 KB
testcase_15 AC 48 ms
37,260 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 47 ms
37,120 KB
testcase_19 AC 47 ms
37,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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*3<=B;j++) {
				if(C*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