結果
問題 |
No.432 占い(Easy)
|
ユーザー |
|
提出日時 | 2017-08-11 04:37:15 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 153 bytes |
コンパイル時間 | 540 ms |
コンパイル使用メモリ | 29,056 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 19:47:52 |
合計ジャッジ時間 | 1,170 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 22 |
コンパイルメッセージ
main.c:1:14: warning: data definition has no type or storage class 1 | char a[1010];n,j;p; | ^ main.c:1:14: warning: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:16: warning: 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: warning: type defaults to 'int' in declaration of 'p' [-Wimplicit-int] main.c:2:1: warning: return type defaults to 'int' [-Wimplicit-int] 2 | main(i){ | ^~~~ main.c: In function 'main': main.c:2:1: warning: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:3:14: warning: implicit declaration of function 'gets' [-Wimplicit-function-declaration] 3 | for(;gets(a);--i&&puts(a)) | ^~~~ main.c:3:27: warning: 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: warning: 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' /usr/bin/ld: /tmp/ccafHc8b.o: in function `main': main.c:(.text.star
ソースコード
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; } }