結果
問題 |
No.804 野菜が苦手
|
ユーザー |
![]() |
提出日時 | 2019-03-30 00:55:59 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 724 bytes |
コンパイル時間 | 3,451 ms |
コンパイル使用メモリ | 74,396 KB |
実行使用メモリ | 50,376 KB |
最終ジャッジ日時 | 2024-11-07 01:36:42 |
合計ジャッジ時間 | 5,407 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 14 WA * 4 |
ソースコード
/*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--; } while(ordered_vegetables+ordered_meat>capacity){ ordered_vegetables--; ordered_meat-=multiple; } System.out.println(ordered_vegetables); }catch(Exception e){ e.printStackTrace(); } } }