当前位置:网站首页>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了
边栏推荐
- 倒置字符串
- 3D角色建模师和3D角色动画师哪个更有前景?哪个更适合小白入门?
- 堆排序(Heap Sort)实现
- TensorFlow学习记录(七):生成对抗网络
- Open Office XML 格式中的 Style 设计原理
- Will ODPS spark on Dataworks process data more efficiently than directly using ODPS SQL?
- ABAP 报表中如何给报表的输入参数增添 F4 Value Help
- 什么是Shell?从小白到入门你只差一个它
- 2021年9月电子学会图形化二级编程题解析含答案:画正多边形
- This error is reported when the shake database is started. Is there a problem with the configuration?
猜你喜欢
TensorFlow学习记录(七):生成对抗网络
uniapp parent component uses prop to pass asynchronous data to child components
ORACLE子查询 导致无法谓词推入的研究
The origin and creation of Smobiler's complex controls
啥?分库分表会带来读扩散问题?怎么解决???
Laravel 5.8笔记
Azure Neural TTS 持续上新,助力企业开拓小语种市场
精彩来袭!鲲鹏开发者创享日·长沙站来啦
MySQL:Update高并发下变慢的案例及其涉及的特性
Style Design Principles in Open Office XML Format
随机推荐
Style Design Principles in Open Office XML Format
Shell编程之循环语句与函数
数据压缩和归档(二)、zipfile
搭建企业级数据治理体系指南
ABAP 报表中如何给报表的输入参数增添 F4 Value Help 试读版
hdu1042 N! (large number)
什么是Shell?从小白到入门你只差一个它
面试官:Redis 大 key 要如何处理?
2022年美术生就业前景解析
A Preliminary Study on Pannellum, a Lightweight Panorama Viewer
使用 lua 运行 fscript
3D游戏建模教程:游戏角色制作——赏金猎人,超逼真
2021年9月电子学会图形化三级编程题解析含答案:绘制图形
数据压缩和归档(三)、tarfile
水印图像读取与制作,三通道图转为4通道,制作透明图
LabVIEW报错“仪器IO助手未正确安装”
Redis之SDS数据结构
flask基础知识:
“非洲之王”传音答复投资者提问:手机产品暂无计划进入中国
如何在Firewalld中为特定IP地址开放端口