跳到正文

题解

题解:P11784 「FAOI-R4」问题跳转

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

文章信息

发布
2025年3月8日
收录
2026年7月31日
更新
2026年11月18日
篇幅
约 1 分钟
题目
P11784

版本

  1. v1当前

首先,<PID>的第一个字符如果是数字,就要输出P,否则直接输出 ,太水了 ,上代码!


C++
#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;
}
原文