-
Notifications
You must be signed in to change notification settings - Fork 0
/
Further_prime_division.py
39 lines (26 loc) · 1014 Bytes
/
Further_prime_division.py
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
best_Nubmer_spec = [0,0]
prime_deviation = []
for i in range(0,10):
New_Num = int(input())
# detect all prime division of input number
all_prime_deviation = []
for j in range(2,New_Num+1):
if New_Num%j==0:
indicator = 0
for div_ind in all_prime_deviation:
if j%div_ind==0:
indicator += 1
break
if indicator==0:
all_prime_deviation.append(j)
if best_Nubmer_spec[1]<len(all_prime_deviation):
best_Nubmer_spec[1]=len(all_prime_deviation)
best_Nubmer_spec[0]=New_Num
prime_deviation = all_prime_deviation
elif best_Nubmer_spec[1] == len(all_prime_deviation):
if best_Nubmer_spec[0]<New_Num:
best_Nubmer_spec[0]=New_Num
best_Nubmer_spec[1]=len(all_prime_deviation)
prime_deviation = all_prime_deviation
print(best_Nubmer_spec)
print(prime_deviation)