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

建议使用的浏览器:

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

6908:Hate That You Know Me

题目描述
Little Y can’t help himself learning number theory. However, math is too hard for him. He was beaten by SPOJ AFS3 and felt down. So here is a simple math problem. Let σk(n) be the following definition:

$$
\sigma_k(n) = \sum_{d|n} d^k
$$

For example, when k = 0, this function is known as the count of divisors of n. And when k = 1, this function is known as the sum of divisors of n.

Now he wants to calculate the following fomula for given a and b.

$$
\left( \left( \sum_{i=1}^n \sigma_a(i) \right) \oplus \left( \sum_{i=1}^n \sigma_b(i) \right) \right) \mod 2^{64}
$$

where $\oplus$ means the bitwise exclusive or.
输入解释
The first line contains an integer T (1 ≤ T ≤ 15) denoting the count of testcase.

For each testcase, one line containing three integer a,b and n.

To be much simpler,it is guaranteed that 0 ≤ a,b < 4 and 1 ≤ n ≤ $10^{12}$.Then you can solve this problem without either interpolation or SPOJ DIVCNT1.
输出解释
For each testcase, one line containing the value.
输入样例
2
0 1 4
2 3 2
输出样例
7
12
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-6908

最后修改于 2021-06-22T18:18:50+00:00 由爬虫自动更新

共提交 0

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