0%

Problem 877


Problem 877


XOR-Equation A

We use xy for the bitwise XOR of x and y.

Define the XOR-product of x and y, denoted by xy, similar to a long multiplication in base 2, except that the intermediate results are XORed instead of the usual integer addition.

For example, 73=9, or in base 2, 1112112=10012:
11111121111112111111211111291110012
We consider the equation:
(aa)(2ab)(bb)=5
For example, (a,b)=(3,6) is a solution.

Let X(N) be the XOR of the b values for all solutions to this equation satisfying 0abN.

You are given X(10)=5.

Find X(1018).


异或等式(一)

xy表示xy按位异或的结果。

考虑xy2进制长乘法,但将中间结果的相加替换为按位异或,定义其结果为xy异或积,并记作xy

例如,73=9,或在2进制下,1112112=10012
11111121111112111111211111291110012
考虑等式:
(aa)(2ab)(bb)=5
例如,(a,b)=(3,6)是上式的一个解。

考虑所有满足0abN的上式的解,并记X(N)为所有这些解中b的取值按位异或的结果。

已知X(10)=5

X(1018)


Gitalking ...