結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー snowpchicksnowpchick
提出日時 2018-10-15 03:49:49
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 330 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 22,400 KB
実行使用メモリ 6,940 KB
最終ジャッジ日時 2024-04-20 20:22:51
合計ジャッジ時間 455 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
5,248 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:6: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 | scanf("%d",&i);
      | ~~~~~^~~~~~~~~

ソースコード

diff #

#include<stdio.h>


int main() {

		int i, x;

scanf("%d",&i);

		for (x = 1; x <= i; x++) {

			



			if (x % 5 == 0 && x % 3 == 0) {
				printf("Fizzbuzz\n");



			}
			else if (x % 5 == 0) {

				printf("Buzz\n");

			}
			else if (x % 3 == 0) {

				printf("Fizz\n");

			}
			else {
				printf("%d\n", x);



			}

		}
		
}
0