結果
| 問題 |
No.804 野菜が苦手
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-09 16:36:53 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 777 bytes |
| コンパイル時間 | 3,134 ms |
| コンパイル使用メモリ | 73,144 KB |
| 実行使用メモリ | 37,012 KB |
| 最終ジャッジ日時 | 2024-10-12 07:46:09 |
| 合計ジャッジ時間 | 4,928 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 WA * 9 |
ソースコード
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+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;
}
}