2 Mathematically Identical Solutions, one is AC other is WA

Revision en1, by VandanRogheliya, 2020-06-11 10:55:49

I was trying to solve this question.

First I wrote this solution which got WA.

Then after checking other already AC solutions I changed the solution to this which got AC.

Both solutions look mathematically identical to me.

Can anyone please explain to me where I am wrong?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English VandanRogheliya 2020-06-11 10:55:49 513 Initial revision (published)