結果

問題 No.804 野菜が苦手
ユーザー sister_DBsister_DB
提出日時 2019-06-09 21:49:46
言語 C++11
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 512 ms
コンパイル使用メモリ 54,632 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-06 00:19:40
合計ジャッジ時間 1,279 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 17 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main(){
    
    int a, b, c, d,tmp;
    cin >> a >> b >> c >> d;
    while(true){
        tmp = b / c;
        if(tmp + tmp * c < d)
            break;
        b -= c;
    }
    if(a < tmp)
        cout << a << "\n";
    else
        cout << tmp << "\n";
    
    return 0;
}
0