-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask3.py
More file actions
41 lines (38 loc) · 725 Bytes
/
Copy pathtask3.py
File metadata and controls
41 lines (38 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import math
def simple1(arg):
k = False
for i in range(2,arg):
if arg%i == 0:
k = False
break
else:
k = True
if k :
return True
"""def parne(arg):
if arg%2 == 0:
arg = arg/2
parne(arg)
else:
return arg
def D_on_three(arg):
s=0
arg = str(arg)
for i in arg:
s+=int(i)
"""
res=[]
def prostD(a):
for i in range(3,math.floor(a+1), 2):
if a%i == 0:
if simple1(i):
res.append(i)
print(i)
a = a/i
break
if a != 1:
prostD(a)
else:
print('the end')
return res
print(prostD(600851475143))