why isn't output to the 3rd test case coming correct?

//jewels and stones
#include<stdio.h>
#include<string.h>
int main()
{
int t;
scanf("%d",&t);
while(t–)
{
char j[101],s[101];
scanf("%s",j);
scanf("%s",s);
int i,k,m=0;
for(i=0;i<strlen(j);i++)
{
for(k=0;k<strlen(s);k++)
{
if(j[i]==s[k])
{
m=m+1;
break;
}
}
}
printf("%d",m);
}
return 0;
}

You need to search number of characters of string s in string j. You are doing it opposite here.

thank you!

//