結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー kurante5
提出日時 2021-03-14 15:40:09
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 457 bytes
コンパイル時間 887 ms
コンパイル使用メモリ 65,512 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-06 05:30:30
合計ジャッジ時間 1,190 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main() {
    int N;
    cin >> N;
    for (int i=0; i < N; i++) {
        if (i % 3 == 0){
            if (i % 5 == 0){
                cout << "FizzBuzz" << endl;
                continue;
            }
            cout << "Fizz" << endl;
        }
        else if (i % 5 == 0) {
            cout << "Buzz" << endl;
        }
        else {
            cout << i+1 << endl;
        }
    }
}
0