#P3791. Double Summation of Divisor Function under XOR
Double Summation of Divisor Function under XOR
Double Summation of Divisor Function under XOR
Given three integers n, m, and x, compute the value of
\( S = \sum_{i=0}^{n} \sum_{j=0}^{m} d\bigl(i\operatorname{xor}j\operatorname{xor}x\bigr) \)
where \( \operatorname{xor} \) denotes the bitwise XOR operation, and \( d(y) \) denotes the number of positive divisors of y (with the convention that \( d(0)=0 \)). Since the answer can be large, output the result modulo \( 998244353 \).
inputFormat
The input consists of a single line containing three space-separated integers \( n \), \( m \), and \( x \).
outputFormat
Output a single integer, the value of \( S \) modulo \( 998244353 \).
sample
1 1 1
2