Created
April 29, 2017 14:41
-
-
Save happasuke/4302b28b8acf33b1c8050e393d4cfbdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main(){ | |
int n; | |
int p; | |
string s; | |
cin >> n; | |
cin.ignore(); | |
for (int i = 0; i < n; i++){ | |
getline(cin, s); | |
do{ | |
p = s.find("Hoshino"); | |
if (p != -1){ | |
s.replace(p,7,"Hoshina"); | |
} | |
else{ | |
break; | |
} | |
} while (p-7 >= s.length()); | |
cout << s << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment