結果

問題 No.8022 縛りFizzBuzz (Easy)
ユーザー noimi
提出日時 2021-09-09 22:04:09
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 405 bytes
コンパイル時間 1,839 ms
コンパイル使用メモリ 191,444 KB
最終ジャッジ日時 2025-01-24 09:05:24
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    int n;
    cin >> n;
    int one{};
    one++;
    int three{};
    three++, three++;
    int five{};
    five++, five++, five++, five++;
    for(int i = one; i <= n; i++) {
        if(!(i % three)) { cout << "Fizz"; }
        if(!(i % five)) { cout << "Buzz"; }
        if(i % three or i % five) { cout << i; }
        cout << endl;
    }
}
0