Why Codechef rejected my code (Chef and digits of a number)

ad-hoc
cakewalk
chandubaba
sept16
string

#1

#include<stdio.h>

int main() {
long long int t,num,temp,count1,count0,b;
scanf("%lld",&t);
while(t–)
{
scanf("%lld",&num);
temp=0,b=0;
temp=num;
count1=0,count0=0;
while(temp!=0)
{
b=temp%10;
if(b==1)
count1++;
else if(b==0)
count0++;
temp/=10;
}
if(num==1||num==0)
printf("Yes
");
else
{
if((count1>1&&count0>1)||count1==0||count0==0)
printf("No
");
else if(count1==1&&count0>1)
printf("Yes
");
else if(count0==1&&count1>1)
printf("Yes
");
else if(count1==1&&count0==1)
printf("Yes
");

 }

}return 0;
}