I know how to solve this problem Perfect Number in a brute force way but the tags on that page show binary search and DP as well. I am curious to know how this problem can be solved using Binary search and DP. Can someone help me with this please? asked 17 Apr '18, 17:37

Read the comments here: http://codeforces.com/blog/entry/57462 They discussed the binary search and other solutions to the problem. Tell me if you are not able to understand, then I'll explain the soultion here