[Codeforces] ABBYY Cup 2.0 - Easy C1. PartyRead more
[Codeforces] Round #827 (Div. 4) F. SmallerRead more
[Codeforces] Round #827 (Div. 4) G. OrrayRead more
[LeetCode] Similar RGB Color

800. Similar RGB Color

The red-green-blue color “#AABBCC” can be written as “#ABC” in shorthand.

  • For example, “#15c” is shorthand for the color “#1155cc”.

The similarity between the two colors “#ABCDEF” and “#UVWXYZ” is -(AB - UV)2 - (CD - WX)2 - (EF - YZ)2.

Given a string color that follows the format “#ABCDEF”, return a string represents the color that is most similar to the given color and has a shorthand (i.e., it can be represented as some “#XYZ”).

Any answer which has the same highest similarity as the best answer will be accepted.

Read more
[AtCoder] A - Zero-Sum RangesRead more
[AtCoder] C - Sequence Growing EasyRead more
[AtCoder] B - BackfrontRead more
[AtCoder] C - Ordinary BeautyRead more
[AtCoder] B - Find SymmetriesRead more
[Codeforces] ABBYY Cup 2.0 - Easy D2. Encrypting MessagesRead more