#PQJ1088x5376. QOJ 1088_5376
QOJ 1088_5376
标题: xor - Problem - QOJ.ac
The problem was used in the following contests:
给定 n,d,计算
ans=∑0≤x,y,z<n(x⊕y⊕z)dmod998244353
输入格式
两个整数 n,d。
输出格式
输出整数 ans。
样例数据
样例输入
10 3
样例输出
718116
子任务
对于子任务 1(10%):0<n≤300,d≤3。
对于子任务 2(10%):0<n≤5000,d≤3。
对于子任务 3(20%):0<n≤105,d≤3。
对于子任务 4(20%):0<n≤230,d≤3。
对于子任务 5(20%):0<n≤230,d≤10。
对于子任务 6(20%):0<n≤230,d≤105。