結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー Drakkon
提出日時 2018-02-04 01:56:31
言語 C(gnu17)
(gcc 15.2.0)
コンパイル:
gcc-15 -O2 -std=gnu17 -Wno-error=implicit-function-declaration -Wno-error=implicit-int -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
実行時間 -
コード長 274 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 53 ms
コンパイル使用メモリ 36,352 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-21 18:41:07
合計ジャッジ時間 1,437 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function 'main':
main.c:9:16: warning: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    9 |         printf('\n');
      |                ^~~~
      |                |
      |                int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

ソースコード

diff #
raw source code

#include <stdio.h>
int main(void){
    int N, i;
    scanf("%d", &N);
    for(i = 1; i <= N; i++){
        if(i % 3 == 0) printf("Fizz");
        if(i % 5 == 0) printf("Buzz");
        if(i % 3 != 0 && i % 5 != 0) printf("%d", i);
        printf('\n');
    }
    return 0;
}
0