Advertisement
boris-vlasenko

68

Jan 13th, 2016
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. def dsum(a):
  2.     res = 1
  3.     for i in range(2,a // 2 + 1):
  4.         if a % i == 0:
  5.             res += i
  6.     return res
  7.  
  8.  
  9. for i in range(1,50000):
  10.     s = dsum(i)
  11.     if dsum(s) == i:
  12.         print(i,s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement