結果
問題 |
No.457 (^^*)
|
ユーザー |
👑 ![]() |
提出日時 | 2017-07-15 06:28:47 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 9 ms / 2,000 ms |
コード長 | 180 bytes |
コンパイル時間 | 111 ms |
コンパイル使用メモリ | 27,776 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-08 01:22:35 |
合計ジャッジ時間 | 990 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
コンパイルメッセージ
main.c:2:1: warning: data definition has no type or storage class 2 | d[10];main(i){for(;read(0,&i,1);)i&1?f(4)f(9)0:i&4?f(2)d[1]=*d,*d=0,f(8)d[7]=d[6],d[6]=0:i%5?f(3)d[2]=0,f(6)d[5]=0:++*d+d[5]++;printf("%d %d",d[4],d[9]);} | ^ main.c:2:1: warning: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] main.c:2:7: warning: return type defaults to 'int' [-Wimplicit-int] 2 | d[10];main(i){for(;read(0,&i,1);)i&1?f(4)f(9)0:i&4?f(2)d[1]=*d,*d=0,f(8)d[7]=d[6],d[6]=0:i%5?f(3)d[2]=0,f(6)d[5]=0:++*d+d[5]++;printf("%d %d",d[4],d[9]);} | ^~~~ main.c: In function 'main': main.c:2:7: warning: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:2:20: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration] 2 | d[10];main(i){for(;read(0,&i,1);)i&1?f(4)f(9)0:i&4?f(2)d[1]=*d,*d=0,f(8)d[7]=d[6],d[6]=0:i%5?f(3)d[2]=0,f(6)d[5]=0:++*d+d[5]++;printf("%d %d",d[4],d[9]);} | ^~~~ main.c:2:128: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 2 | d[10];main(i){for(;read(0,&i,1);)i&1?f(4)f(9)0:i&4?f(2)d[1]=*d,*d=0,f(8)d[7]=d[6],d[6]=0:i%5?f(3)d[2]=0,f(6)d[5]=0:++*d+d[5]++;printf("%d %d",d[4],d[9]);} | ^~~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf' +++ |+#include <stdio.h> 1 | #define f(n)d[n]+=d[n-1], main.c:2:128: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] 2 | d[10];main(i){for(;read(0,&i,1);)i&1?f(4)f(9)0:i&4?f(2)d[1]=*d,*d=0,f(8)d[7]=d[6],d[6]=0:i%5?f(3)d[2]=0,f(6)d[5]=0:++*d+d[5]++;printf("%d %d",d[4],d[9]);} | ^~~~~~ main.c:2:128: note: include '<stdio.h>' or provide a declaration of 'printf'
ソースコード
#define f(n)d[n]+=d[n-1], d[10];main(i){for(;read(0,&i,1);)i&1?f(4)f(9)0:i&4?f(2)d[1]=*d,*d=0,f(8)d[7]=d[6],d[6]=0:i%5?f(3)d[2]=0,f(6)d[5]=0:++*d+d[5]++;printf("%d %d",d[4],d[9]);}