結果

問題 No.537 ユーザーID
ユーザー pekempey
提出日時 2017-06-30 22:22:50
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
RE  
実行時間 -
コード長 298 bytes
コンパイル時間 663 ms
コンパイル使用メモリ 69,744 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-10-04 19:08:29
合計ジャッジ時間 2,384 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2 RE * 1
other WA * 29 RE * 3
権限があれば一括ダウンロードができます

ソースコード

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