卬高杯
提出id | 提出時刻 | ユーザー名 | 問題 | 言語 | 判定状況 | 判定 | 実行時間 |
---|---|---|---|---|---|---|---|
115021 | 2023-10-25 23:19:03 | A | B | cpp | 18/18 | AC | 8 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string inputString = "あなたのXは素晴らしいX";
cin>> inputString;
// "X" を "Twitter" に置換
size_t found = inputString.find("X");
while (found != string::npos) {
inputString.replace(found, 1, "Twitter");
found = inputString.find("X", found + 7); // 7 は "Twitter" の文字数です
}
cout << inputString << endl;
return 0;
}
sample1.txt AC 2 sample2.txt AC 2 sample3.txt AC 3 case1.txt AC 7 case2.txt AC 8 case3.txt AC 8 case4.txt AC 8 case5.txt AC 8 case6.txt AC 8 case7.txt AC 8 case8.txt AC 8 case9.txt AC 8 case10.txt AC 8 case11.txt AC 8 case12.txt AC 8 case13.txt AC 8 case14.txt AC 8 case15.txt AC 8 8 AC8 AC