2 Mathematically Identical Solutions, one is AC other is WA
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?
Round 948 Div 2 Solution Discussion (with Jan)