的肌肤

turing_lisihan 2023-11-11 10:09:52

撒地方,麻烦和。

共 2 条回复

turing_lisihan

(#include <bits/stdc++.h> using namespace std; const int mod=1000000007; long long sum=1; int main() { int n, k; cin >> n >> k; for (int i=n;i>n-k;i--) sum*=i, sum%=mod; cout << sum%mod; return 0; } )

turing_lisihan

#include <bits/stdc++.h> using namespace std; const int mod=1000000007; long long sum=1; int main() { int n, k; cin >> n >> k; for (int i=n;i>n-k;i--) sum*=i, sum%=mod; cout << sum%mod; return 0; }