結果
問題 | No.536 人工知能 |
ユーザー |
![]() |
提出日時 | 2017-08-27 16:39:11 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 257 bytes |
コンパイル時間 | 643 ms |
コンパイル使用メモリ | 55,240 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 06:45:25 |
合計ジャッジ時間 | 1,111 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <iostream>#include <string>using namespace std;int main() {string s;cin >> s;int n = (int)s.length() - 1;if (s[n - 1] == 'a' && s[n] == 'i') {s[n - 1] = 'A';s[n] = 'I';} else {s += "-AI";}cout << s << endl;}