I've checked many small inputs & my program generates correct outputs pretty quickly.
For some large values my program generates following:
Now I've got AC
I wasn't taking care of inputs < 1. Following IO seems to be correct
Inputs:
Code: Select all
10
2147483647
2147483646
2147463645
2147463644
2147463643
2147463642
2147463641
2147463640
2147463639
2147463638
Code: Select all
46475828386
46475828384
46475375550
46475375518
46475375512
46475375504
46475375472
46475375470
46475375406
46475375394
GOT AC, DID A SILLY MISTAKE. MY SOLUTION WAS CORRECT!!!