結果
| 問題 |
No.536 人工知能
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-06 02:52:48 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 272 bytes |
| コンパイル時間 | 108 ms |
| コンパイル使用メモリ | 22,784 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-14 02:32:13 |
| 合計ジャッジ時間 | 639 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%s",sid);
| ~~~~~^~~~~~~~~~
ソースコード
#include <cstdio>
#include <cstring>
int main(){
char sid[10];
scanf("%s",sid);
int len=strlen(sid);
if(sid[len-2]=='a' && sid[len-1]=='i'){
sid[len-2]='A';sid[len-1]='I';
printf("%s\n",sid);
}else printf("%s-AI\n",sid);
return 0;
}