mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
34806a93cd
2500-2599
24 lines
420 B
C++
24 lines
420 B
C++
#include<stdio.h>
|
|
#include<string.h>
|
|
int main()
|
|
{
|
|
char a[100005];
|
|
int length_a,i,j,n,t,d;
|
|
scanf("%d",&n);
|
|
while(n--)
|
|
{
|
|
scanf("%s%d",&a,&t);
|
|
length_a=strlen(a);
|
|
for(i=0;a[i]!='.';i++)
|
|
{
|
|
}
|
|
j=i+1;
|
|
d=length_a-j;
|
|
if(t>d)
|
|
printf("0\n");
|
|
else
|
|
printf("%c\n",a[i+t]);
|
|
}
|
|
return 0;
|
|
}
|