結果
| 問題 | 
                            No.804 野菜が苦手
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Dente
                         | 
                    
| 提出日時 | 2019-09-10 21:34:18 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 513 bytes | 
| コンパイル時間 | 1,306 ms | 
| コンパイル使用メモリ | 166,944 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-07-02 16:23:22 | 
| 合計ジャッジ時間 | 1,991 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 14 WA * 4 | 
ソースコード
#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 << ans << endl;
}
            
            
            
        
            
Dente