#P7092. 计数题
计数题
Description
You have an infinite set that contains all primes less than or equal to , and also all products made from these primes.
For example, when , the set actually contains (primes), and (products of primes). Let this set be .
Compute:
$\sum\limits_{S\subset T,S\neq\varnothing}\mu(\prod\limits_{i\in S}i)\varphi(\prod\limits_{i\in S}i)$
Take the result modulo . It can be proven that this sum exists.
To help you get partial scores, we will give an integer that represents some restrictions. The value of may affect the answer. Please read the hint carefully.
.
Input Format
One line with two integers .
Output Format
One line with one integer, the answer modulo .
2 2
998244352
114514 2
662314206
Hint
The restrictions for are as follows:
The chosen set must contain at least one perfect square.
The chosen set can only contain primes.
No restrictions.
| Test Point ID | ||
|---|---|---|
Explanation for Sample :
The answer is , which is modulo .
Translated by ChatGPT 5
京公网安备 11011102002149号