Why WA in subtask 2 (WEIRDO)

https://www.codechef.com/viewsolution/27785888
if I take double, at last, it is giving WA

I Heard use log in this ques … but how?

Plenty of discussions and solutions here :slight_smile: