結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー vjudge1
提出日時 2025-02-05 02:16:58
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 374 bytes
コンパイル時間 1,924 ms
コンパイル使用メモリ 160,264 KB
実行使用メモリ 433,280 KB
最終ジャッジ日時 2025-02-05 02:17:18
合計ジャッジ時間 18,267 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26 TLE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    int a, b, c;
    cin>>a>>b>>c;
    set<int> count;

    for(int i = a; i <= n; i += a){
        count.insert(i);
    }    
    for(int i = b; i <= n; i += b){
        count.insert(i);
    }
    for(int i = c; i <= n; i += c){
        count.insert(i);
    }
    cout<< count.size() <<endl;
}
0