Abundant

#!/usr/bin/python3
import sys; beg,end=int(sys.argv[1]),int(sys.argv[2]);[print(f"{n} is "+("perfect" if (s:=sum(x for x in range(1,1+n//2) if n%x==0))==n else "abundant" if s>n else "deficient")) for n in range(beg,end+1)]

Unknown's avatar

About Linuxgal

Need a spiritual home? Consider joining us at Mary Queen of the Universe Latter-day Buddhislamic Free Will Christian UFO Synagogue of Vishnu
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment