Help needed with codeforces problem?

codeforces

#1

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?


#2

Can someone help please??


#3

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