Валерия обнови решението на 25.10.2022 17:09 (преди около 2 години)
+def calculate_final_result(coordinates, *args):
+ x, y = coordinates
+
+ for i in range(0, len(args), 1):
+ for color in args:
+
+ if color[i] == '000000' : # black
+ break
+
+ elif color[i] == 'C0FFC0' or color[i] == 'FFC0C0' or color[i] == 'c0ffc0' or color[i] == 'ffc0c0': # light green or light red
+ x -= 1
+
+ elif color[i] == '00C000' or color[i] == 'C00000' or color[i] == '00c000' or color[i] == 'c00000': # dark green or dark red
+ x += 1
+
+ elif color[i] == 'C0C000' or color[i] == '0000C0' or color[i] == 'c0c000' or color[i] == '0000c0': # dark yellow or dark blue
+ y += 1
+
+ elif color[i] == 'FFFFC0' or color[i] == 'C0C0FF' or color[i] == 'ffffc0' or color[i] == 'c0c0ff': # light yellow or light blue
+ y -= 1
+
+ elif color[i] == 'FFFFFF' or color[i] == 'ffffff': # white
+ continue
+
+ return x, y