結果
| 問題 | No.536 人工知能 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-21 23:32:07 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 126 bytes |
| 記録 | |
| コンパイル時間 | 72 ms |
| コンパイル使用メモリ | 24,532 KB |
| 最終ジャッジ日時 | 2026-02-22 01:03:15 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
1 | main(){char s[11];gets(s);int a=strlen(s);if(s[a-1]=='i'&&s[a-2]=='a'){s[a-1]='I';s[a-2]='A';puts(s);}else printf("%s-AI",s);}
| ^~~~
main.c: In function 'main':
main.c:1:19: error: implicit declaration of function 'gets' [-Wimplicit-function-declaration]
1 | main(){char s[11];gets(s);int a=strlen(s);if(s[a-1]=='i'&&s[a-2]=='a'){s[a-1]='I';s[a-2]='A';puts(s);}else printf("%s-AI",s);}
| ^~~~
main.c:1:33: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
1 | main(){char s[11];gets(s);int a=strlen(s);if(s[a-1]=='i'&&s[a-2]=='a'){s[a-1]='I';s[a-2]='A';puts(s);}else printf("%s-AI",s);}
| ^~~~~~
main.c:1:1: note: include '<string.h>' or provide a declaration of 'strlen'
+++ |+#include <string.h>
1 | main(){char s[11];gets(s);int a=strlen(s);if(s[a-1]=='i'&&s[a-2]=='a'){s[a-1]='I';s[a-2]='A';puts(s);}else printf("%s-AI",s);}
main.c:1:33: warning: incompatible implicit declaration of built-in function 'strlen' [-Wbuiltin-declaration-mismatch]
1 | main(){char s[11];gets(s);int a=strlen(s);if(s[a-1]=='i'&&s[a-2]=='a'){s[a-1]='I';s[a-2]='A';puts(s);}else printf("%s-AI",s);}
| ^~~~~~
main.c:1:33: note: include '<string.h>' or provide a declaration of 'strlen'
main.c:1:94: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
1 | main(){char s[11];gets(s);int a=strlen(s);if(s[a-1]=='i'&&s[a-2]=='a'){s[a-1]='I';s[a-2]='A';puts(s);}else printf("%s-AI",s);}
| ^~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'puts'
+++ |+#include <stdio.h>
1 | main(){char s[11];gets(s);int a=strlen(s);if(s[a-1]=='i'&&s[a-2]=='a'){s[a-1]='I';s[a-2]='A';puts(s);}else printf("%s-AI",s);}
main.c:1:108: error: implicit dec
ソースコード
main(){char s[11];gets(s);int a=strlen(s);if(s[a-1]=='i'&&s[a-2]=='a'){s[a-1]='I';s[a-2]='A';puts(s);}else printf("%s-AI",s);}