結果
問題 | No.536 人工知能 |
ユーザー | u-sho |
提出日時 | 2017-06-30 22:37:00 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 320 bytes |
コンパイル時間 | 512 ms |
コンパイル使用メモリ | 51,836 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-07-27 19:53:21 |
合計ジャッジ時間 | 1,246 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 2 ms
4,376 KB |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | AC | 2 ms
4,376 KB |
testcase_04 | AC | 1 ms
4,380 KB |
testcase_05 | AC | 2 ms
4,380 KB |
testcase_06 | AC | 2 ms
4,376 KB |
testcase_07 | AC | 2 ms
4,380 KB |
testcase_08 | AC | 1 ms
4,380 KB |
testcase_09 | AC | 2 ms
4,380 KB |
testcase_10 | AC | 2 ms
4,380 KB |
ソースコード
#include <iostream> #include <string> using namespace std; int main(void){ char S[11]; int i=0; while(cin>>S[i]){i++;} if(S[i-2]=='a' && S[i-1]=='i'){ for(int j=0;j<i-2;j++){ cout<<S[j]; } cout<<"AI"<<endl; }else{ for(int j=0;j<i;j++){cout<<S[j];} cout<<"-AI"<<endl; } return 0; }