Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count=0
- a=int(input("Input number: "))
- if a<2:
- print("Invalid Input")
- else:
- for i in range(2,a+1):
- total_of_factors=0
- for j in range(1,i):
- if i%j==0:
- total_of_factors+=j
- if total_of_factors>i:
- count+=1
- print(count)
Add Comment
Please, Sign In to add comment