#include #include #include #include #include #include #include int main(){ int n; long long result; scanf("%d",&n); int *m = malloc(sizeof(int) * n); for(int m_i = 0; m_i < n; m_i++){ scanf("%d",&m[m_i]); } // your code oes here n--; result = n; while (n > 0) { result *= n; n--; } printf("%d\n", result % (1000000007)); return 0; }