結果
| 問題 |
No.804 野菜が苦手
|
| コンテスト | |
| ユーザー |
hato3617
|
| 提出日時 | 2019-03-22 21:34:04 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 401 bytes |
| コンパイル時間 | 497 ms |
| コンパイル使用メモリ | 64,084 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-19 02:53:45 |
| 合計ジャッジ時間 | 1,075 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 WA * 2 |
ソースコード
#include <iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<cstdio>
using namespace std;
int main(){
int a, b, c, d;
cin >> a >> b >> c >> d;
if (a*c <= b) {
if (a*c + a <= d) {
cout << a << endl;
}
else {
cout << d / (c + 1)<<endl;
}
}
else {
if ((b/c+b) <= d) {
cout << b/c << endl;
}
else {
cout << 0 << endl;
}
}
return 0;
}
hato3617