当前位置:网站首页>hdu2647 N!Again
hdu2647 N!Again
2022-08-08 18:51:00 【51CTO】
N!Again
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4781 Accepted Submission(s): 2527
Problem Description
WhereIsHeroFrom: Zty, what are you doing ?
Zty: I want to calculate N!......
WhereIsHeroFrom: So easy! How big N is ?
Zty: 1 <=N <=1000000000000000000000000000000000000000000000…
WhereIsHeroFrom: Oh! You must be crazy! Are you Fa Shao?
Zty: No. I haven's finished my saying. I just said I want to calculate N! mod 2009
Hint : 0! = 1, N! = N*(N-1)!
Input
Each line will contain one integer N(0 <= N<=10^9). Process to end of file.
Output
For each case, output N! mod 2009
Sample Input
Sample Output
Author
WhereIsHeroFrom
Source
Recommend
lcy | We have carefully selected several similar problems for you: 2672 2668 2673 2669 2671
Statistic | Submit | Discuss | Note
看到n的范围 I know the rules in my head...
In fact, you can see the output of the result.If a value is exactly divisible2009 那么 后面的都是0了
边栏推荐
猜你喜欢
随机推荐
DHCP服务初探
响应式pbootcms模板电脑维修类网站
We want to replace the RDS database and upgrade from sqlserver 2016 web to 2017 enterprise cluster version, with expert consultation
如何在Firewalld中为特定IP地址开放端口
同花顺可以买股票吗?买股票安全吗?
The origin and creation of Smobiler's complex controls
性能优化|从ping延时看CPU电源管理
【LeetCode】40、组合总和II
Vue program of web cache problem after packaging
Oracle--表
/目录 、/home目录 、~目录的区别
2 prerequisites for successful "digital transformation" of enterprises!
微信小程序云开发 | 插件的微信小程序云开发
关于求最小公倍数的三种常用方法
量子力学奇妙之旅-铁磁性来由/双态系统
echart 股票数据分析 开发备忘录
flask基础知识:
Shell正则表达式
Redhat 7 Maria DB installation and configuration
PG's huge page