結果
| 問題 | No.432 占い(Easy) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-11 04:37:15 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 153 bytes |
| 記録 | |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 25,524 KB |
| 最終ジャッジ日時 | 2026-02-22 00:08:36 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:1:14: warning: data definition has no type or storage class
1 | char a[1010];n,j;p;
| ^
main.c:1:14: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:16: error: type defaults to 'int' in declaration of 'j' [-Wimplicit-int]
1 | char a[1010];n,j;p;
| ^
main.c:1:18: warning: data definition has no type or storage class
1 | char a[1010];n,j;p;
| ^
main.c:1:18: error: type defaults to 'int' in declaration of 'p' [-Wimplicit-int]
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(i){
| ^~~~
main.c: In function 'main':
main.c:2:1: warning: old-style function definition [-Wold-style-definition]
main.c:2:1: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:3:14: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
3 | for(;gets(a);--i&&puts(a))
| ^~~~
main.c:3:27: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
3 | for(;gets(a);--i&&puts(a))
| ^~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
+++ |+#include <stdio.h>
1 | char a[1010];n,j;p;
main.c:5:23: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
5 | for(n=strlen(a);--n;a[n]=0)for(j=0;j++<n;a[j-1]=48+(p>9?p/10+p%10:p))p=a[j-1]+a[j]-96;
| ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
+++ |+#include <string.h>
1 | char a[1010];n,j;p;
main.c:5:23: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
5 | for(n=strlen(a);--n;a[n]=0)for(j=0;j++<n;a[j-1]=48+(p>9?p/10+p%10:p))p=a[j-1]+a[j]-96;
| ^~~~~~
main.c:5:23: note: include '<string.h>' or provide a declaration of 'strlen'
ソースコード
char a[1010];n,j;p;
main(i){
for(;gets(a);--i&&puts(a))
{
for(n=strlen(a);--n;a[n]=0)for(j=0;j++<n;a[j-1]=48+(p>9?p/10+p%10:p))p=a[j-1]+a[j]-96;
}
}