跳到正文

题解

题解:P12527 [XJTUPC 2025] 全都登不上

#SUSPENDED#约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2026年5月16日
篇幅
约 1 分钟
获赞
8
题目
P12527

版本

  1. v1当前

题目链接

思路很简单,代码很简短。

题目思路:

本题考查分支结构和字符串。

读入一个字符串,在遇到给定字符时跳过,否则输出就行。

Code:

C++
/*
    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;
}

祝通过!

原文