#C2898. Count Distinct Ways to Fill Cars

    ID: 46264 Type: Default 1000ms 256MiB

Count Distinct Ways to Fill Cars

Count Distinct Ways to Fill Cars

You are given an integer n representing the number of cars. Each car must be filled exactly once in a sequential process such that once a car is filled, it cannot be used again. The number of distinct ways to fill all n cars is equal to n! (n factorial). Since n! can be very large, compute the answer modulo \(10^9+7\).

Note: It is guaranteed that \(n \ge 2\).

inputFormat

The input consists of a single integer n (\(2 \le n \le 1000\)), representing the number of cars.

outputFormat

Output a single integer representing the number of distinct ways to fill the cars modulo \(10^9+7\).

## sample
2
2