R3
Size: a a a
R3
L
R3
L
S
L
S
S
L
L
A
F
#!/usr/bin/env python3
import _thread as thread
num = int(input())
fib_list = [1, 1]
check_stop_thread = [False] * 4
if num < 2:
print('Значение должно быть больше 2х')
def make_fib_list(num1, num2, n):
fib1 = fib2 = 1
for i in range(num1, num2):
fib1, fib2 = fib2, fib1 + fib2
fib_list.append(fib2)
check_stop_thread[n] = True
thread.start_new_thread(make_fib_list, (2, num // 4, 0))
thread.start_new_thread(make_fib_list, (num // 4, num // 2, 1))
thread.start_new_thread(make_fib_list, (num // 2, num // 2 + num // 4, 2))
thread.start_new_thread(make_fib_list, (num // 2 + num // 3, num, 3))
while False in check_stop_thread:
pass
else:
print(fib_list)
F
DY
F
AG
AG
AG
L
D