Калоян обнови решението на 22.10.2022 02:47 (преди около 2 години)
+def calculate_final_vector(coord, colours):
+ x, y = coord
+ for color in colours:
+ if color.lower() == 'c0ffc0' or color.lower() == 'c00000':
+ x -= 1
+ elif color.lower() == '00c000' or color.lower() == 'ffc0c0':
+ x += 1
+ elif color.lower() == 'ffffc0' or color.lower() == '0000c0':
+ y -= 1
+ elif color.lower() == 'c0c000' or color.lower() == 'c0c0ff':
+ y += 1
+ elif color.lower() == '000000':
+ break
+ return x, y
All fair game, нямам забележки (уви ).