记录编号 | 601028 | 评测结果 | AAAAAAAAAA | ||
---|---|---|---|---|---|
题目名称 | 3709.线性同余发生器 | 最终得分 | 100 | ||
用户昵称 | 是否通过 | 通过 | |||
代码语言 | C++ | 运行时间 | 0.414 s | ||
提交时间 | 2025-05-24 15:47:26 | 内存使用 | 3.84 MiB | ||
#include<bits/stdc++.h> using namespace std; const int mod=1e9+7; int a,m; int main(){ freopen("LCG.in","r",stdin); freopen("LCG.out","w",stdout); scanf("%d%d",&a,&m); long long ans=1; for(int i=1;i<m;i++){ ans=ans*i%mod; } printf("%d",ans); return 0; }