結果

問題 No.804 野菜が苦手
ユーザー heyanxxheyanxx
提出日時 2019-07-09 16:32:40
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 774 bytes
コンパイル時間 3,810 ms
コンパイル使用メモリ 74,368 KB
実行使用メモリ 50,460 KB
最終ジャッジ日時 2024-04-20 12:16:19
合計ジャッジ時間 5,801 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
37,052 KB
testcase_01 WA -
testcase_02 AC 49 ms
36,884 KB
testcase_03 WA -
testcase_04 AC 50 ms
37,196 KB
testcase_05 AC 51 ms
36,716 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 52 ms
37,164 KB
testcase_15 AC 51 ms
36,564 KB
testcase_16 AC 53 ms
37,116 KB
testcase_17 AC 51 ms
36,912 KB
testcase_18 AC 50 ms
37,028 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

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>12) {
					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