比赛 | 2025.5.24 | 评测结果 | AAAAAAAAAA |
---|---|---|---|
题目名称 | 线性同余发生器 | 最终得分 | 100 |
用户昵称 | 会挽弯弓满月 | 运行时间 | 0.398 s |
代码语言 | C++ | 内存使用 | 3.88 MiB |
提交时间 | 2025-05-24 11:03:48 | ||
#include <bits/stdc++.h> #define ll long long using namespace std; const ll mod=1e9+7; ll a,m; ll ans=1; int main(){ freopen("LCG.in","r",stdin); freopen("LCG.out","w",stdout); scanf("%lld%lld",&a,&m); if(a==1){ printf("No black hole!"); return 0; } for(ll i=2;i<m;i++){ ans*=i; ans%=mod; } printf("%lld",ans); return 0; }