結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー Cassian Russell-Hart
提出日時 2025-09-14 14:36:25
言語 C
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 330 bytes
コンパイル時間 328 ms
コンパイル使用メモリ 26,448 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-09-14 14:36:27
合計ジャッジ時間 742 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |     scanf("%d", &N);
      |     ^~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(int argc, char *argv[]) {
    int N;
    scanf("%d", &N);
    for (int i = 1; i <= N; i++) {
	if (i % 15 == 0) {
	    printf("Fizz Buzz\n");   
	} else if (i % 3 == 0) {
	    printf("Fizz\n");
	} else if (i % 5 == 0) {
	    printf("Buzz\n");
	} else {
	    printf("%d\n", i);
	}
    }
    return 0;
}
0