Time Limit Exceed

yes I got the solution but my solution is still janky and it just brute force can you help me to find a better way to find this solution here’s the codehttps://ide.codingblocks.com/s/593774

@tanishchaurasiacool you can use binary search to reduce time complexity

ok so i have take the power of the mid point and check if it is smaller or bigger then my n and then update my mid accordingly

1 Like

@tanishchaurasiacool yes thats right