P11784 题解
题目传送门
思路
首先判断题号 P。最后输出 https://www.luogu.com.cn/problem/ 加上
AC CODE
#include<bits/stdc++.h>
using namespace std;
int read(){int x=0;char f=1,ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9')x=x*10+ch-'0',ch=getchar();return x*f;}
int main(){
int T=read();
while(T--){
string s;cin>>s;
if(isdigit(s[0]))
s='P'+s;
cout<<"https://www.luogu.com.cn/problem/"<<s<<"\n";
}
return 0;
}