mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 03:11:58 +00:00
769. 替换字符
https://www.acwing.com/problem/content/submission/code_detail/6944024/
This commit is contained in:
parent
86b50a0f4f
commit
3fc12e9ae2
21
AcWing/769/769.cpp
Normal file
21
AcWing/769/769.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
string s;
|
||||
cin >> s;
|
||||
|
||||
char op;
|
||||
cin >> op;
|
||||
|
||||
for (char c : s) {
|
||||
if (c != op) {
|
||||
cout << c;
|
||||
} else {
|
||||
cout << '#';
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user