結果

問題 No.8022 縛りFizzBuzz (Easy)
コンテスト
ユーザー 1119_2916
提出日時 2017-03-31 22:31:00
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 904 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 976 ms
コンパイル使用メモリ 174,732 KB
実行使用メモリ 6,144 KB
最終ジャッジ日時 2026-03-28 19:31:13
合計ジャッジ時間 1,386 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
 
using namespace std;
 
#define int long long
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define i_i pair<int, int>
#define vi vector<int>
#define vvi vector<vi >
#define vb vector<bool>
#define vvb vector<vb >
#define vp vector< i_i >
#define all(a) (a).begin(), (a).end()
#define Int(x) int x; scanf("%lld", &x);
#define int2(x, y) int x, y; scanf("%lld %lld", &x, &y);
 
// assign
 
signed main()
{
    Int(n);
    for (int i = 'b' - 'a'; i <= n; i++) {
        if ( (!(i % ('d' - 'a'))) && (!(i % ('f' - 'a'))) ) {
            cout << "FizzBuzz" << endl;
        } else if (!(i % ('d' - 'a'))) {
            cout << "Fizz" << endl;
        } else if (!(i % ('f' - 'a'))) {
            cout << "Buzz" << endl;
        } else {
            cout << i << endl;
        }
    }
    return ('a' - 'a');
}
0