結果
| 問題 | No.536 人工知能 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-21 23:32:07 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 126 bytes |
| 記録 | |
| コンパイル時間 | 123 ms |
| コンパイル使用メモリ | 28,484 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-03-08 16:16:37 |
| 合計ジャッジ時間 | 483 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
main.c: In function ‘main’:
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: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:108: warning: incompatible implicit declaration of built-in function ‘printf’ [-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:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#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);}
/usr/bin/ld: /tmp/ccGIrPTF.o: in function `main':
main.c:(.text.startup+0x22): 警告: the `gets' function is dangerous and should not be used.
ソースコード
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);}