結果

問題 No.536 人工知能
ユーザー pekempeypekempey
提出日時 2017-06-30 22:21:01
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 298 bytes
コンパイル時間 736 ms
コンパイル使用メモリ 69,836 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-04 18:54:42
合計ジャッジ時間 911 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>

int main() {
	std::string s;
	std::cin >> s;

	if (s.substr(s.size() - 2) == "ai") {
		s[s.size() - 2] = 'A';
		s[s.size() - 1] = 'I';
		std::cout << s << std::endl;
	} else {
		std::cout << s + "-AI" << std::endl;
	}
}
0