#P8570. Double Summation with Divisor Count and Euler's Totient
Double Summation with Divisor Count and Euler's Totient
Double Summation with Divisor Count and Euler's Totient
Given two positive integers n and m, compute the following double summation:
$$S = \sum_{i=1}^{n}\sum_{j=1}^{m} \sigma_0(ij)\,\varphi(ij)$$
Here, $$\sigma_0(k)$$ denotes the number of positive divisors of k and $$\varphi(k)$$ is Euler's totient function, which counts the number of integers in the range [1, k] that are coprime with k.
inputFormat
The input consists of a single line containing two space-separated positive integers n and m.
outputFormat
Output a single integer representing the value of the double summation.
sample
1 1
1