結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー vjudge1
提出日時 2025-02-05 01:29:38
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 431 bytes
コンパイル時間 1,123 ms
コンパイル使用メモリ 96,652 KB
実行使用メモリ 16,960 KB
最終ジャッジ日時 2025-02-05 01:30:17
合計ジャッジ時間 36,896 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 18 TLE * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

int main(){
    int n, a, b, c, x=0;
    cin >> n >> a >> b >> c;
    for(int i=1;i<=n;i++){
        if(i%a==0){
            x++;
            continue;
        }
        else if(i%b==0){
            x++;
            continue;
        }
        else if(i%c==0){
            x++;
            continue;
        }
    }
    cout << x;
}
0