結果
問題 |
No.804 野菜が苦手
|
ユーザー |
![]() |
提出日時 | 2019-03-28 21:54:50 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 699 bytes |
コンパイル時間 | 3,291 ms |
コンパイル使用メモリ | 75,196 KB |
実行使用メモリ | 50,444 KB |
最終ジャッジ日時 | 2024-10-14 15:06:45 |
合計ジャッジ時間 | 5,249 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 WA * 3 |
ソースコード
/*No.804 野菜が苦手*/ import java.io.*; public class No804{ public static void main(String[] args) { try(BufferedReader input =new BufferedReader(new InputStreamReader(System.in))){ String[]s_input=input.readLine().split(" "); byte ordered_vegetables=Byte.parseByte(s_input[0]); byte ordered_meat=Byte.parseByte(s_input[1]); byte multiple=Byte.parseByte(s_input[2]); byte capacity=Byte.parseByte(s_input[3]); while(ordered_vegetables*multiple>ordered_meat){ ordered_vegetables--; } if(ordered_vegetables>capacity){ System.out.println(capacity); }else{ System.out.println(ordered_vegetables); } }catch(Exception e){ e.printStackTrace(); } } }