結果
問題 |
No.637 X: Yet Another FizzBuzz Problem
|
ユーザー |
👑 ![]() |
提出日時 | 2018-01-28 19:59:21 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 80 bytes |
コンパイル時間 | 85 ms |
コンパイル使用メモリ | 28,672 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 18:51:23 |
合計ジャッジ時間 | 877 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 30 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | s;main(n){for(;~scanf("%d",&n);)s+=!(n%3)+!(n%5)<<2?:log10(n)+1;printf("%d",s);} | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 's' [-Wimplicit-int] main.c:1:3: warning: return type defaults to 'int' [-Wimplicit-int] 1 | s;main(n){for(;~scanf("%d",&n);)s+=!(n%3)+!(n%5)<<2?:log10(n)+1;printf("%d",s);} | ^~~~ main.c: In function 'main': main.c:1:3: warning: type of 'n' defaults to 'int' [-Wimplicit-int] main.c:1:17: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | s;main(n){for(;~scanf("%d",&n);)s+=!(n%3)+!(n%5)<<2?:log10(n)+1;printf("%d",s);} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | s;main(n){for(;~scanf("%d",&n);)s+=!(n%3)+!(n%5)<<2?:log10(n)+1;printf("%d",s);} main.c:1:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | s;main(n){for(;~scanf("%d",&n);)s+=!(n%3)+!(n%5)<<2?:log10(n)+1;printf("%d",s);} | ^~~~~ main.c:1:17: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:54: warning: implicit declaration of function 'log10' [-Wimplicit-function-declaration] 1 | s;main(n){for(;~scanf("%d",&n);)s+=!(n%3)+!(n%5)<<2?:log10(n)+1;printf("%d",s);} | ^~~~~ main.c:1:1: note: include '<math.h>' or provide a declaration of 'log10' +++ |+#include <math.h> 1 | s;main(n){for(;~scanf("%d",&n);)s+=!(n%3)+!(n%5)<<2?:log10(n)+1;printf("%d",s);} main.c:1:54: warning: incompatible implicit declaration of built-in function 'log10' [-Wbuiltin-declaration-mismatch] 1 | s;main(n){for(;~scanf("%d",&n);)s+=!(n%3)+!(n%5)<<2?:log10(n)+1;printf("%d",s);} | ^~~~~ main.c:1:54: note: include '<math.h>' or provide a
ソースコード
s;main(n){for(;~scanf("%d",&n);)s+=!(n%3)+!(n%5)<<2?:log10(n)+1;printf("%d",s);}