結果

問題 No.804 野菜が苦手
ユーザー hiro_ei1812
提出日時 2019-09-24 18:15:45
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 284 bytes
コンパイル時間 356 ms
コンパイル使用メモリ 54,196 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-19 05:11:37
合計ジャッジ時間 965 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(){
    int A,B,C,D;
    int veg=0,meat=0,i,j;
    int total=0;

    cin>>A>>B>>C>>D;

    while(total<=D && veg<=A && meat<=B){
        total=veg+meat;
        veg++;
        meat=veg*C;
    }

    cout<<veg-1<<endl;
    return 0;
}
0