結果

問題 No.9002 FizzBuzz(テスト用)
ユーザー ninhydrin_
提出日時 2015-04-02 16:07:34
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 264 bytes
コンパイル時間 621 ms
コンパイル使用メモリ 20,096 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-03 23:29:22
合計ジャッジ時間 1,064 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:3: 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 N;
  scanf("%d",&N);
  int i;
  for (i = 1; i <= N; ++i) { 
    if(i%3==0&&i%5==0)printf("FizzBuzz\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