結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー vjudge1
提出日時 2025-02-06 21:32:15
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 471 bytes
コンパイル時間 12,051 ms
コンパイル使用メモリ 257,124 KB
実行使用メモリ 163,712 KB
最終ジャッジ日時 2025-02-06 21:33:18
合計ジャッジ時間 61,433 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 TLE * 1
other AC * 13 TLE * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
    long long int n = 0;
    cin >> n;
    int a = 0, b = 0, c = 0;
    cin >> a >> b >> c;
    set<int> ans;
    for (long long int i = 2; i <= n; i++)
    {
        if (i % a == 0)
        {
            ans.insert(i);
        }
        if (i % b == 0)
        {
            ans.insert(i);
        }
        if (i % c == 0)
        {
            ans.insert(i);
        }
    }
    cout << ans.size() << endl;
}
0