結果

問題 No.804 野菜が苦手
ユーザー Dente
提出日時 2019-09-10 21:35:32
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 521 bytes
コンパイル時間 1,488 ms
コンパイル使用メモリ 166,204 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-02 16:24:06
合計ジャッジ時間 2,017 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define REP(i,a) for(int i = 0; i < (a); i++)
#define ALL(a) (a).begin(),(a).end()
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const int MOD = 1e9 + 7;

signed main(){
    int a,b,c,d;
    cin >> a >> b >> c >> d;
    int ans = 0, cnt = 0;
    for(int i = 1; i <= b; i++){
        if(i % c == 0){
            ans++;
            cnt++;
        }
        cnt++;
        if(cnt > d){
            break;
        }
    }
    cout << min(a, ans) << endl;
}
0