思路很简单,代码很简短。
题目思路:
本题考查分支结构和字符串。
读入一个字符串,在遇到给定字符时跳过,否则输出就行。
Code:
/*
Auther:MingDynasty
Problem:https://www.luogu.com.cn/problem/P12527
*/
#include<bits/stdc++.h>
using namespace std;
int a,b,c;
int main(){
cin.tie(0)->sync_with_stdio(0);
cin>>a;
while(a--){
string k;
cin>>k;
for(int i=0;i<k.size();i++){
if(k[i]=='1'||k[i]=='i'||k[i]=='l'||k[i]=='I') continue;
cout<<k[i];
}
cout<<'\n';
}
return 0;
}
祝通过!