| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 23 | 13 | 9 | 47.368% |
Compute the number of ways to choose two subsets $X, Y \subseteq \{2, 3, \dots, n\}$ such that there does not exist $x \in X, y \in Y$ such that $x$ and $y$ are not relatively prime. The sets $X, Y$ may be empty. Output the number of ways modulo $p$.
The input contains the integer $n$ and the modulo $p$ separated by a space.
Output the number of ways to choose the subsets $X, Y \subseteq \{2, 3, \dots, n\}$ satisfying the condition above.
3 10000
9
4 10000
21
100 100000000
3107203