結果
| 問題 |
No.536 人工知能
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-06-30 22:24:39 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 282 bytes |
| コンパイル時間 | 192 ms |
| コンパイル使用メモリ | 20,224 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-04 19:22:52 |
| 合計ジャッジ時間 | 753 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%s",s);
| ^~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(int argc, char const *argv[]){
char s[14];
int i;
scanf("%s",s);
for(i=0;s[i]!='\0';i++){
}
if(s[i-2]=='a' && s[i-1]=='i'){
s[i-2]='A';
s[i-1]='I';
}else{
s[i]='-';
s[i+1]='A';
s[i+2]='I';
s[i+3]='\0';
}
printf("%s\n",s);
return 0;
}