結果

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

ソースコード

diff #

#include <iostream>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    long long n;
    cin >> n;

    long long a, b, c;
    cin >> a >> b >> c;

    int f = 0;

    for (long long i = 1; i <= n; i++)
    {
        if (i % a == 0 || i % b == 0 || i % c == 0)
        {
            f++;
        }
    }

    cout << f << endl;
}
0