def yinzi(m):
s=[]
for i in range(1,int(math.sqrt(m))+1):
if m%i==0:
s.append(i)
if i!=m/i:
s.append(m/i)
return s
import math
class Solution:
def doQuestion(self , n ):
# write code here
happy=0
for j in range(1,n+1):
k=yinzi(j)
if sum(k)/n<2:
happy=happy+j
else:
pass
return happy