結果
| 問題 | No.804 野菜が苦手 |
| コンテスト | |
| ユーザー |
iwa_choco_168
|
| 提出日時 | 2019-12-03 16:36:58 |
| 言語 | Java (openjdk 25.0.2) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 583 bytes |
| 記録 | |
| コンパイル時間 | 1,693 ms |
| コンパイル使用メモリ | 86,116 KB |
| 実行使用メモリ | 49,756 KB |
| 最終ジャッジ日時 | 2026-05-21 16:03:19 |
| 合計ジャッジ時間 | 5,601 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | AC * 1 TLE * 1 -- * 17 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
int c = Integer.parseInt(sc.next());
int d = Integer.parseInt(sc.next());
int tempA = 0, tempB = 0, ans = 0;
while(tempA + tempB <= d) {
if(tempA + 1 <= a && tempB + c <= b) {
tempA++;
tempB += c;
ans++;
}
}
System.out.println(--ans);
}
}
iwa_choco_168