結果
問題 |
No.804 野菜が苦手
|
ユーザー |
|
提出日時 | 2019-07-09 16:32:40 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 774 bytes |
コンパイル時間 | 3,377 ms |
コンパイル使用メモリ | 74,824 KB |
実行使用メモリ | 50,420 KB |
最終ジャッジ日時 | 2024-10-12 07:35:42 |
合計ジャッジ時間 | 5,403 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 7 WA * 11 |
ソースコード
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; } }