結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー Tsu0664Tsu0664
提出日時 2018-08-26 21:52:04
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 356 ms
コンパイル使用メモリ 52,176 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-13 19:24:02
合計ジャッジ時間 843 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main() {
    int a;
    string s;

    cin >> a;
    
    for(int i = 1; i <= a; i++){
        s = "";
        if((i % 3) == 0){
            s += "Fizz";
        }
        if((i % 5) == 0){
            s += "Buzz";
        }
        if(s == ""){
            s = i;
        }
        
        cout << s << endl;
    }
    
    return 0;
}
0