結果

問題 No.3022 縛りFizzBuzz (Easy)
ユーザー confconf
提出日時 2017-03-31 22:42:11
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 413 bytes
コンパイル時間 547 ms
コンパイル使用メモリ 62,868 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-21 11:00:17
合計ジャッジ時間 1,451 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <iostream>
using namespace std;
const int THREE = 'D'-'A';
const int FIVE = 'F'-'A';
int i;

int main(){
    int N;
    cin>>N;
    for(i++;i<=N;i++){
        if(i%THREE==0&&i%FIVE==0){
            cout<<"FizzBuzz"<<endl;
        }else if(i%THREE==0){
            cout<<"Fizz"<<endl;
        }else if(i%FIVE==0){
            cout<<"Buzz"<<endl;
        }else{
            cout<<i<<endl;
        }
    }
}
0