| 记录编号 | 283090 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 2037.Asm.Def大点兵 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.015 s | ||
| 提交时间 | 2016-07-14 09:02:40 | 内存使用 | 0.26 MiB | ||
#include<cstdio>
#include<algorithm>
#define LL unsigned long long
using namespace std;
LL n,m,mod;
LL mul(LL x,LL y,LL z){return (x*y-(LL)(x/(long double)z*y+1e-3)*z+z)%z;}
int main(){
freopen("appoint.in","r",stdin);
freopen("appoint.out","w",stdout);
scanf("%llu%llu%llu",&n,&m,&mod);
LL ans=1;
for(int i=1;i<=10000;i++);
for(int i=0;i<m;i++)ans=mul(ans,n-i,mod);
printf("%llu\n",ans);
}