Sample Test Case is passed but all other test cases are failing can you tell me where I went wrong?

This is the link to my code

@Udit-Sehra-2366292823468769
Hello Udit,
In line no 35 it should be >= instead of >

@Udit-Sehra-2366292823468769
rest of ur logic is totally correct .
here is ur working code link - https://ide.codingblocks.com/s/175908
if u have any furthur doubt then pls ask otherwise mark you doubt as resolved.