Getting Wrong answer for the last test case

I’m getting wrong answer for the last test case. What’s wrong in my code?

@archit_18 hey Archit please share your code link after saving code on ide so that we can help you asap

are you able to see my code?

here’s the link to my code : https://ideone.com/jCaZtw

@archit_18 hey archit you code is not working for this input size in this link .
your output is
Yes
24
but
expected output is
Yes
31

Hey Archit,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.