DOUBT--BOSTON NUMBER

CODE-https://ide.codingblocks.com/s/380617
QUES-https://hack.codingblocks.com/app/contests/1927/495/problem

I have personally compiled your code with test case number 1,2 & 4 which was showing that your answer is wrong. But what i found is that your answer is coming right for all test cases. Might be some issue. Would suggest you to open test cases and you will see that expected output is same as of yours.

Sir, may I know why is it failing for 1,2,4

yes sir, for 1,2,4 the sump will remain zero as the condition for loop on i will not meet thats why

code-https://ide.codingblocks.com/s/380617 but it is still failing test cases 1,2,4,5

Have replied to you on chat.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.