結果

問題 No.3022 縛りFizzBuzz (Easy)
ユーザー trineutrontrineutron
提出日時 2021-01-01 01:31:42
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 553 bytes
コンパイル時間 2,379 ms
コンパイル使用メモリ 193,404 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-18 09:45:15
合計ジャッジ時間 2,574 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int zero, one;

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