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