pleas see my code and commented my mistake
code_https://ide.codingblocks.com/
Only two test case is running and remaining are fail to run
this is correct souce code link_https://ide.codingblocks.com/s/277658
sir i updated my code by replace int with lon long int ,but it still all the test cases are not running
updated code link _https://ide.codingblocks.com/s/277658
Check ur updated code.
a)
s should be updated as
s=mid+1
b)
this should be sum .
c)use long long for mid