結果

問題 No.3022 縛りFizzBuzz (Easy)
ユーザー 👑 Nafmo2Nafmo2
提出日時 2017-03-31 22:42:58
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 611 bytes
コンパイル時間 651 ms
コンパイル使用メモリ 71,744 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-21 11:00:53
合計ジャッジ時間 1,464 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

 #include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<stack>
#include<queue>
#include<vector>
typedef long long int ll;
using namespace std;

    int N,a,b;
    int zero;
#define EREP(i,n) for (int i=(zero);i<=(n);i++)


 int main(){
     ios_base::sync_with_stdio(false);
     cin>>N;
     a++;
     a++;
     a++;
     b++;
     b++;
     b++;
     b++;
     b++;
    EREP(i,N){
        if(!(i%a)&&(i%b))cout<<"Fizz"<<endl;
        if(!(i%b)&&(i%a))cout<<"Buzz"<<endl;
        if(!(i%b)&&!(i%a))cout<<"FizzBuzz"<<endl;
        if((i%a)&&(i%b))cout<<i<<endl;
    }
 }
0