Skip to content

Instantly share code, notes, and snippets.

@ysnerdem
Created December 11, 2017 21:57
Show Gist options
  • Save ysnerdem/6aa5b71d51b317c5cb50544dcbb97404 to your computer and use it in GitHub Desktop.
Save ysnerdem/6aa5b71d51b317c5cb50544dcbb97404 to your computer and use it in GitHub Desktop.
def mukemmel_sayi(sayi):
lst = [i for i in range(1, sayi) if sayi % i == 0]
sum = 0
for i in lst:
sum += i
if sum == sayi:
print(sayi)
for i in range(1, 1001):
mukemmel_sayi(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment