an extra zero cost me the AC

Revision en1, by svg_af, 2016-03-27 00:30:08

I was trying to solve this problem

and calculating the GCD for two double variables i put eps = 1e-8 and i got WA

wondering what was going on i looked at other codes and all they did that was different was put eps = 1e-4

i tried it and got AC, and tried every value upto 1e-8 and all of them got right answers

it got me wondering about the reason

here is my submission

any clarification would be appreciated

Tags floating-point, wa, question

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English svg_af 2016-03-27 00:30:08 559 Initial revision (published)