Replace them all c++ online assignment

https://ide.codingblocks.com/#/s/23008
which test case is not working??? one test case is not passed while other is passed

View this solution
https://ide.codingblocks.com/#/s/23105
Actually you had to use long instead of int.