plz tell me why it is giving me wrong ans .
https://www.codechef.com/viewsolution/44231309
This should help
It helped Thx Bro .