結果
問題 |
No.9002 FizzBuzz(テスト用)
|
ユーザー |
![]() |
提出日時 | 2015-10-26 21:52:01 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 248 bytes |
コンパイル時間 | 206 ms |
コンパイル使用メモリ | 20,096 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-23 18:12:13 |
合計ジャッジ時間 | 613 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d",&a); | ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ int a,i; scanf("%d",&a); for(i=1;i<=a;i++){ if(i%3 == 0 && i%5 == 0) printf("FizzBuzz\n"); else if(i%5 == 0) printf("Buzz\n"); else if(i%3 == 0) printf("Fizz\n"); else printf("%d\n",i); } return 0; }