题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=2081

题目分析:
利用substr即可快速获取后五位
#include<iostream>
#include<string>
using namespace std;
int main(void)
{
int n;
cin>>n;
while(n--){
string s;
cin>>s;
string ss= s.substr(6,5);
cout<<6<<ss<<endl;
}
}
本文介绍了一个简单的程序实现方法来解决HDU 2081问题,主要通过使用C++中的substr函数来截取字符串后五位,并进行特定格式的输出。
1006

被折叠的 条评论
为什么被折叠?



