結果

問題 No.536 人工知能
ユーザー Gamer13Gamer13
提出日時 2017-08-30 03:56:37
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 475 bytes
コンパイル時間 591 ms
コンパイル使用メモリ 68,368 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-24 03:19:20
合計ジャッジ時間 1,166 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <iomanip>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>


#define FOR(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define FORR(i,l,n) for(int (i)=l;(i)<(int)(n);++(i))

int main() {

	std::string S;
	std::cin >> S;
	if (S.find("ai",S.size()-2) != std::string::npos) {
		std::string temp = "AI";
		S.replace(S.size() - 2, 2, temp);
	}
	else {
		S += "-AI";
	}
	std::cout << S << std::endl;

	return 0;
}

0