My issue
include <stdio.h>
include <math.h>
int main()
{ long long int c,d,e,f;
int a;
scanf(“%d”,&a) ;
for (int b = 1;b<=a; b++)
{
scanf("%lld",&c) ;
scanf("%lld",&d) ;
e=pow(c,4)+4*pow(d,2);
f=4*pow(c,2)*d;
if (e == f)
{printf("yes\n");
}
else {printf("no\n");}
}
}
this code is failing one test case
My code
#include <stdio.h>
#include <math.h>
int main()
{ long long int c,d,e,f;
int a;
scanf("%d",&a) ;
for (int b = 1;b<=a; b++)
{
scanf("%lld",&c) ;
scanf("%lld",&d) ;
e=pow(c,4)+4*pow(d,2);
f=4*pow(c,2)*d;
if (e == f)
{printf("yes\n");
}
else {printf("no\n");}
}
}
Learning course: Number theory
Problem Link: CodeChef: Practical coding for everyone