0
点赞
收藏
分享

微信扫一扫

HDOJ  2549    壮志难酬

雨鸣静声 2022-08-22 阅读 92


题目:​​http://acm.hdu.edu.cn/showproblem.php?pid=2549​​

#include <iostream>
using namespace std;
int main()
{
int T,n,i;
string s;
cin>>T;
while(T--)
{
int flag=0;
cin>>s>>n;
for(i=0;i<s.length();i++)
if(s[i]=='.')
break;
if(n<s.length()-i)
cout<<s[i+n]<<endl;
else
cout<<0<<endl; //忘记这个‘0’,你必挂啊.....
}
return 0;
}

举报

相关推荐

0 条评论