← Back to topics
Topic

task golf 7th test case

j
jokermc1
got WA on 7th case?!
Moderators or Admin can u help me or tell what's the catch?

fw tnx
D
Daniel93
try to use double.
j
jokermc1
i tried it already :S
D
Daniel93
Your mistake is here:
temp=sqrt(((x-fx)*(x-fx)+(y-fy)*(y-fy))/2) ;

Well you have to divide the distance with 2, so put it out of sqrt.
temp=sqrt(((x-fx)*(x-fx)+(y-fy)*(y-fy))) /2;