Unable to see any logical flaw

I have attempted the solution just as prateek bhaiya has described. Please point out any logical flaws.

@siddhu28.ss please share your code using cb ide so that i can check

@siddhu28.ss try using long long int everywhere and tell if it works

1 Like

Working, that was the only issue. Thanks!

@siddhu28.ss you are welcome :smiley: