Problem 734
A bit of prime
The logical-OR of two bits is
The bitwise-OR of two positive integers performs a logical OR operation on each pair of corresponding bits in the binary expansion of its inputs.
For example, the bitwise-OR of
Let
- every
is a prime - the bitwise-OR of the tuple is a prime
For example,
You are given
Find
质数与位运算
在数的二进制表示下,每一位数字称为一个比特。两个比特之间的逻辑或定义如下:若这两个比特均为
两个正整数的按位或定义如下:将这两个正整数表示成二进制,并将对应位置的比特进行逻辑或运算。
例如,
记
- 每个
均为小于等于 的质数; - 元组中所有数按位或的结果是一个小于等于
的质数。
例如,
已知
求
Be the first person to leave a comment!