結果
| 問題 | No.804 野菜が苦手 |
| コンテスト | |
| ユーザー |
to10to10to10to
|
| 提出日時 | 2019-04-10 21:35:30 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 288µs | |
| コード長 | 420 bytes |
| 記録 | |
| コンパイル時間 | 868 ms |
| コンパイル使用メモリ | 178,936 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-19 01:08:33 |
| 合計ジャッジ時間 | 2,169 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 19 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0; i<n; i++)
#define all(x) (x).begin(),(x).end()
#define INF (1000000000)
#define MOD (1000000007)
#define PI (acos(-1))
int main(){
int a,b,c,d;
cin >> a >> b >> c >> d;
int veg=0,met=0;
while(1){
veg++;
met+=c;
if(veg>a || met>b || veg+met>d){
cout << veg-1 << endl;
return 0;
}
}
}
to10to10to10to