Клементина обнови решението на 25.10.2022 14:44 (преди около 2 години)
+def calculate_final_vector(system, color_list):
+ colors=[
+ ('C0FFC0', -1, 0),
+ ('00C000', 1, 0),
+ ('FFFFC0', 0, -1),
+ ('C0C000', 0, 1),
+ ('FFC0C0', 1, 0),
+ ('C00000', -1, 0),
+ ('C0C0FF', 0, 1),
+ ('0000C0', 0, -1),
+ ('FFFFFF', 0, 0)
+ ]
+ size=len(color_list)
+ for i in range(0,size):
+ for color in colors:
+ if color_list[i].upper()==color[0]:
+ system = (system[0] + color[1], system[1] + color[2])
+ elif color_list[i]=='000000':
+ return system
+ return system