-->
当前位置:首页 > 题库

PROGRAMMING:Surplus

Luz5年前 (2021-05-10)题库428
We define n= 1$$*$$2$$*$$...$$*$$(n-1)$$*$$n,s = 1$$*$$1! + 2$$*$$2! + ...+( n-1)$$*$$(n-1)!, Find s mod n (mod is the remainder operation).
###Input format:
Input a positive integer n in one line, 2 ≤ n ≤ 10 $$^ {18} $$.
###Output format:
For input n, output the result of s mod n.
###Input example:
```in
three
```
###Output example:
```out
two
```







answer:If there is no answer, please comment