結果

問題 No.993 青色
ユーザー 0Kate0Kate
提出日時 2020-04-12 00:26:21
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 411 bytes
コンパイル時間 520 ms
コンパイル使用メモリ 65,228 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 22:20:16
合計ジャッジ時間 1,103 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

void replace_all(string s, string from, string to) {
    int start_pos = 0;
    while ((start_pos = s.find(from, start_pos)) != string::npos) {
        s.replace(start_pos, from.length(), to);
        start_pos += to.length();
    }
}

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

    replace_all(s, "ao", "ki");
    cout << s << endl;

    return 0;
}
0