1245: #506. 「LibreOJ β Round」ZQC 的作业
[Creator : ]
Description
ZQC 有一道作业题:给定 $p\ (1 \leq p < 2 ^ {31}),\ q\ (0 \leq q < 2 ^ {31}),\ n\ (2 \leq n < 2 ^ {31})$,求$x ^ {p} + q$ 在模$n$ 意义下有多少取值。
由于 ZQC 急着去找妹子,所以这道题由你来解决。
由于 ZQC 急着去找妹子,所以这道题由你来解决。
Input
一行三个整数 $p,\ q,\ n$。
Output
一行一个整数表示答案。
Sample 1 Input
2 3 5
Sample 1 Output
3
Sample 2 Input
4 1 15
Sample 2 Output
4