首先,<PID>的第一个字符如果是数字,就要输出P,否则直接输出 ,太水了 ,上代码!
#include<bits/stdc++.h>
using namespace std;
int T;
string str;
int main(){
cin>>T;
while(T--){
cin>>str;
cout<<"https://www.luogu.com.cn/problem/";
if(str[0]>='0'&&str[0]<='9'){
cout<<"P"<<str<<endl;
}else{
cout<<str<<endl;
}
}
return 0;
}