WA IN PROM02

Why this code ibCNbn - Online C++ Compiler & Debugging Tool - Ideone.com gives wrong answer for the question CodeChef: Practical coding for everyone.

I think I am missing something, pretty sure about my logic.