|
|
back to boardDiscussion of Problem 1261. TipsHint or If you don't know how to solve... 1. In a few words: you should find x1 and x2, such that: a) x1 - x2 = N b) x1 and x2 has only '0' and '1' numbers in ternary number system. c) x1 & x2 = 0. x1 and x2 are written in ternary number system. '&' means logical AND operation [0 & 0 = 0, 0 & 1 = 0, 1 & 0 = 0, 1 & 1 = 1], which is applied to the corresponding pairs of digits from the x1 and x2 (in ternary number system). 2. I recommend you to write a) and b) conditions for all digits of the x1 and x2 in ternary number system, and then in decimal number system. 3. You should differ only two variants: if N has only '0' and '1' numbers in ternary number system and the opposite variant. 4. If you need some other hints, you can write me shellkunchik<at>yandex<point>com. |
|
|