結果
| 問題 | No.305 鍵(2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-08-16 00:04:04 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 201 bytes |
| 記録 | |
| コンパイル時間 | 81 ms |
| コンパイル使用メモリ | 25,652 KB |
| 最終ジャッジ日時 | 2026-02-22 00:09:50 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | f[10],a[10],s[9],c;i,k;
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'f' [-Wimplicit-int]
main.c:1:7: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
1 | f[10],a[10],s[9],c;i,k;
| ^
main.c:1:13: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
1 | f[10],a[10],s[9],c;i,k;
| ^
main.c:1:18: error: type defaults to 'int' in declaration of 'c' [-Wimplicit-int]
1 | f[10],a[10],s[9],c;i,k;
| ^
main.c:1:20: warning: data definition has no type or storage class
1 | f[10],a[10],s[9],c;i,k;
| ^
main.c:1:20: error: type defaults to 'int' in declaration of 'i' [-Wimplicit-int]
main.c:1:22: error: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
1 | f[10],a[10],s[9],c;i,k;
| ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | o(){for(k=0;k<10;)printf("%d",a[k++]);fflush(!puts(""));gets(s);return atoi(s);}
| ^
main.c: In function 'o':
main.c:2:19: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
2 | o(){for(k=0;k<10;)printf("%d",a[k++]);fflush(!puts(""));gets(s);return atoi(s);}
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
1 | f[10],a[10],s[9],c;i,k;
main.c:2:19: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
2 | o(){for(k=0;k<10;)printf("%d",a[k++]);fflush(!puts(""));gets(s);return atoi(s);}
| ^~~~~~
main.c:2:19: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:2:39: error: implicit declaration of function 'fflush' [-Wimplicit-function-declaration]
2 | o(){for(k=0;k<10;)printf("%d",a[k++]);fflush(!puts(""));gets(s);return atoi(s);}
ソースコード
f[10],a[10],s[9],c;i,k;
o(){for(k=0;k<10;)printf("%d",a[k++]);fflush(!puts(""));gets(s);return atoi(s);}
main(){
for(c=o();c<10;)for(i=0;i<10&&c<10;c-k?f[i]++,a[i]-=c>k:0,c=k,i++)k=f[i]?c:o(a[i]++);
}