結果
問題 | No.3022 縛りFizzBuzz (Easy) |
ユーザー | myanta |
提出日時 | 2017-03-31 23:02:18 |
言語 | C (gcc 12.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 299 bytes |
コンパイル時間 | 219 ms |
コンパイル使用メモリ | 28,288 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-07 05:13:39 |
合計ジャッジ時間 | 819 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
コンパイルメッセージ
main.c: In function 'main': main.c:6:15: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 6 | while(scanf("%d", &N)>=(i=(i==i))) | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(void) main.c:6:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 6 | while(scanf("%d", &N)>=(i=(i==i))) | ^~~~~ main.c:6:15: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:13:36: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 13 | if(!(i%m)) printf("FizzBuzz\n"); | ^~~~~~ main.c:13:36: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:13:36: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:13:36: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:14:41: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 14 | else if(!(i%n)) printf("Buzz\n"); | ^~~~~~ main.c:14:41: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:15:41: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 15 | else if(!(i%l)) printf("Fizz\n"); | ^~~~~~ main.c:15:41: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:16:30: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 16 | else printf("%d\n", i); | ^~~~~~ main.c:16:30: note: include '<stdio.h>' or provide a dec
ソースコード
int main(void) { int i, N; int m, n, l; while(scanf("%d", &N)>=(i=(i==i))) { l=i+i+i; n=l+i+i; m=n+n+n+n+n; for(;i<=N;i++) { if(!(i%m)) printf("FizzBuzz\n"); else if(!(i%n)) printf("Buzz\n"); else if(!(i%l)) printf("Fizz\n"); else printf("%d\n", i); } } return N-i; }