結果
問題 | No.9002 FizzBuzz(テスト用) |
ユーザー | snowpchick |
提出日時 | 2018-10-15 03:44:12 |
言語 | C (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 311 bytes |
コンパイル時間 | 295 ms |
コンパイル使用メモリ | 28,032 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 18:26:27 |
合計ジャッジ時間 | 534 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,820 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
コンパイルメッセージ
main.c: In function 'main': main.c:6:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | scanf("%d",&i); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | main.c:6:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 6 | scanf("%d",&i); | ^~~~~ main.c:6:1: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:15:33: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 15 | printf("Fizzbuzz\n"); | ^~~~~~ main.c:15:33: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:15:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:15:33: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:22:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 22 | printf("Buzz\n"); | ^~~~~~ main.c:22:33: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:27:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 27 | printf("fizz\n"); | ^~~~~~ main.c:27:33: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:31:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 31 | printf("%d\n", x); | ^~~~~~ main.c:31:33: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
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); } } }