#P10670. BZOJ4174 tty 的求助
BZOJ4174 tty 的求助
Problem Description
Compute the value of the following expression modulo , where is a real number and all other variables involved are integers:
$$\sum_{n=1}^N \sum_{m=1}^M \sum_{k=0}^{m-1} \lfloor \dfrac{nk+x}{m}\rfloor$$Input Format
Input one line containing two positive integers and one real number .
Output Format
Output one line containing one integer, representing the answer modulo .
2 3 1
7
Hint
Constraints: , . The value of is given accurate to digits after the decimal point.
Translated by ChatGPT 5