标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4016 Accepted Submission(s):
2157
#include<stdio.h> #include<string.h> int main() { int n,m,j,i,s,t; while(scanf("%d",&n)!=EOF) { if(n>=41) printf("0\n"); else { s=1; for(i=2;i<=n;i++) { s=s%2009*i%2009; s=s%2009; } printf("%d\n",s); } } return 0; }
标签:
原文地址:http://www.cnblogs.com/tonghao/p/4676233.html