solution -CEQU - Crucial Equation
#include<stdio.h>
int main()
{ long long int a,b,x,c,i,t;
scanf("%lld",&t);
for(i=1;i<=t;i++)
{
scanf("%lld%lld%lld",&a,&b,&c);
while(b!=0)
{
x=a%b;
a=b;
b=x;
}
if(c%a==0)
{ printf("Case %lld: Yes",i);
printf("\n");
}
else
{printf("Case %lld: No",i);
printf("\n");
}
}
return 0;
}
Comments
Post a Comment