当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6256:Rikka with XOR

题目描述
When Rikka was a little girl, she met a hard but interesting problem "A good task to defend AK." This problem uses some properties about XOR $\oplus$ (exclusive OR).

Time flies, six years have passed. Rikka has become a college student. And today, Rikka recollects this task and she finds herself know little about XOR. So she wants to come up with some tasks about XOR and try to solve them.

Most of the tasks are very simple, except one of them. Soon, Rikka finds it is too difficult for her. So she asks you to give her some help. Here is the task:

Given two integers $n,m$, and she wants to calculate $\prod_{i=0}^m n \oplus i$. The answer may be very large, she just wants to know the answer modulo $1500000001$.

输入解释
The first line contains one single integer $t(1 \leq t \leq 20)$, the number of the testcases.

For each testcase, the first line contains two integers $n,m(1 \leq m < n \leq 10^9)$.
输出解释
For each testcase, output a single integer, the answer modulo $1500000001$ which is a prime number.
输入样例
3
3 2
7 5
654321 123456
输出样例
6
5040
1230647278
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6256

最后修改于 2020-10-25T23:29:44+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
4000/2000MS(Java/Others) 512000/512000K(Java/Others)