結果
| 問題 | No.434 占い |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-10-22 20:27:40 |
| 言語 | C90 (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 236 bytes |
| 記録 | |
| コンパイル時間 | 188 ms |
| コンパイル使用メモリ | 30,376 KB |
| 最終ジャッジ日時 | 2026-02-23 22:39:31 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 5 WA * 22 |
コンパイルメッセージ
main.c:1:15: warning: data definition has no type or storage class
1 | char s[1<<17];i,t,a,c,p,x;f(n){return!n|n%3?x=n,0:f(n/3)+1;}main(n){for(gets(s);gets(s);t=a=p=i=!printf("%d\n",a%9?:t?9:0)){for(n=strlen(s)-1,c=1;s[i];c=c*(x=pow(x%9,4))%9){t+=s[i]-=48;a+=c*(p-1?!p:3)*s[i]%9;p+=f(n--);c*=x;p-=f(++i);}}}
| ^
main.c: In function ‘main’:
main.c:1:98: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
1 | char s[1<<17];i,t,a,c,p,x;f(n){return!n|n%3?x=n,0:f(n/3)+1;}main(n){for(gets(s);gets(s);t=a=p=i=!printf("%d\n",a%9?:t?9:0)){for(n=strlen(s)-1,c=1;s[i];c=c*(x=pow(x%9,4))%9){t+=s[i]-=48;a+=c*(p-1?!p:3)*s[i]%9;p+=f(n--);c*=x;p-=f(++i);}}}
| ^~~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | char s[1<<17];i,t,a,c,p,x;f(n){return!n|n%3?x=n,0:f(n/3)+1;}main(n){for(gets(s);gets(s);t=a=p=i=!printf("%d\n",a%9?:t?9:0)){for(n=strlen(s)-1,c=1;s[i];c=c*(x=pow(x%9,4))%9){t+=s[i]-=48;a+=c*(p-1?!p:3)*s[i]%9;p+=f(n--);c*=x;p-=f(++i);}}}
main.c:1:131: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
1 | char s[1<<17];i,t,a,c,p,x;f(n){return!n|n%3?x=n,0:f(n/3)+1;}main(n){for(gets(s);gets(s);t=a=p=i=!printf("%d\n",a%9?:t?9:0)){for(n=strlen(s)-1,c=1;s[i];c=c*(x=pow(x%9,4))%9){t+=s[i]-=48;a+=c*(p-1?!p:3)*s[i]%9;p+=f(n--);c*=x;p-=f(++i);}}}
| ^~~~~~
main.c:1:1: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
+++ |+#include <string.h>
1 | char s[1<<17];i,t,a,c,p,x;f(n){return!n|n%3?x=n,0:f(n/3)+1;}main(n){for(gets(s);gets(s);t=a=p=i=!printf("%d\n",a%9?:t?9:0)){for(n=strlen(s)-1,c=1;s[i];c=c*(x=pow(x
ソースコード
char s[1<<17];i,t,a,c,p,x;f(n){return!n|n%3?x=n,0:f(n/3)+1;}main(n){for(gets(s);gets(s);t=a=p=i=!printf("%d\n",a%9?:t?9:0)){for(n=strlen(s)-1,c=1;s[i];c=c*(x=pow(x%9,4))%9){t+=s[i]-=48;a+=c*(p-1?!p:3)*s[i]%9;p+=f(n--);c*=x;p-=f(++i);}}}
testestest