結果
| 問題 |
No.536 人工知能
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-07 08:56:59 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 377 bytes |
| コンパイル時間 | 643 ms |
| コンパイル使用メモリ | 67,480 KB |
| 最終ジャッジ日時 | 2025-01-09 14:50:53 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
#include <iostream>
#include <string>
void solve() {
std::string s;
std::cin >> s;
int n = s.length();
if (s.substr(n - 2) == "ai") {
s[n - 2] = 'A', s[n - 1] = 'I';
} else {
s += "-AI";
}
std::cout << s << std::endl;
}
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
solve();
return 0;
}