Guest User

Untitled

a guest
Feb 16th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. count=0
  2. a=int(input("Input number: "))
  3. if a<2:
  4. print("Invalid Input")
  5. else:
  6. for i in range(2,a+1):
  7. total_of_factors=0
  8. for j in range(1,i):
  9. if i%j==0:
  10. total_of_factors+=j
  11. if total_of_factors>i:
  12. count+=1
  13. print(count)
Add Comment
Please, Sign In to add comment