luogu#P5106. dkw的lcm
dkw的lcm
Problem Description
In particular, the LCM of a single number is the number itself.
Kind dkw decides to tell you the statement directly:
$$\prod_{i_1=1}^n\prod_{i_2=1}^n …\prod_{i_k=1}^n \varphi\big(lcm(i_1,i_2,…,i_k)\big)$$Please compute the expression above, and output the answer modulo .
Here, denotes the least common multiple of these numbers.
Here, denotes Euler's totient function.
Here, denotes the product symbol, which is the multiplicative version of .
Input Format
Two positive integers, .
Output Format
One non-negative integer, representing the value of the expression modulo .
2 2
1
Hint
For 50% of the testdata, .
For 100% of the testdata, .
Translated by ChatGPT 5