-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseinerj_huge_number.py
33 lines (31 loc) · 1.55 KB
/
seinerj_huge_number.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
number = "7316717653133062491922511967442657474235534919493496\
983520312774506326239578318016984801869478851843858615607891129\
49495459501737958331952853208805511125406987471585238630507156\
932909632952274430435576689664895044524452316173185640309871112\
17223831136222989342338030813533627661428280644448664523874930\
358907296290491560440772390713810515859307960866701724271218839\
98797908792274921901699720888093776657273330010533678812202354\
218097512545405947522435258490771167055601360483958644670632441\
57221553975369781797784617406495514929086256932197846862248283\
972241375657056057490261407972968652414535100474821663704844031\
998900088952434506585412275886668811642717147992444292823086346\
5674813919123162824586178664583591245665294765456828489128831426\
076900422421902267105562632111110937054421750694165896040807198\
403850962455444362981230987879927244284909188845801561660979191\
338754992005240636899125607176060588611646710940507754100225698\
315520005593572972571636269561882670428252483600823257530420752963450"
string = str(number)
# separation of numbers from byg number
output = list(map(int, string))
# starting variables
List_of_multiples = []
parameter = 1
# cycle which iterate through list of numbers which are parts of original number
for i in range(len(output)-13):
parameter = 1
# cycle which make new list of multiples of 13 adjacent numbers
for k in range(1, 14):
parameter *= output[k+i]
List_of_multiples.append(parameter)
# command which find biggest number from list and print it as result
print(max(List_of_multiples))