mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
14 lines
260 B
Python
14 lines
260 B
Python
from math import *
|
|
|
|
|
|
def factors(n):
|
|
result = set()
|
|
for i in range(1, int(sqrt(n)) + 1):
|
|
div, mod = divmod(n, i)
|
|
if mod == 0:
|
|
result.add(div)
|
|
result.add(mod)
|
|
return result
|
|
|
|
|
|
print("loaded Python calculator")
|