当前位置:网站首页>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了
边栏推荐
- Transsion Holdings: At present, there is no clear plan for the company's mobile phone products to enter the Chinese market
- Excuse me, during the mongoshake synchronization process in the shake database, src_mongo hangs up, will the synchronization service not exit?
- 几何g6将搭载harmonyos系统,产品竞争力全面升级
- Style Design Principles in Open Office XML Format
- Will ODPS spark on Dataworks process data more efficiently than directly using ODPS SQL?
- OpenInfra Days China 2022即将开启,与 openEuler 共话开源技术
- 关于求最小公倍数的三种常用方法
- 请问shake数据库中mongoshake同步过程中,src_mongo挂了,同步服务不会退出吗?
- 携手华为打造鲲鹏产业生态 | 麒麟信安亮相鲲鹏开发者创享日·长沙站
- Learn about layered architecture & SOA architecture together
猜你喜欢

内核实战教程第1期|数据库系统概述,带你走近 OceanBase 研发环境!

Laravel 5.8 Notes

Laravel 队列消费实例和定时任务添加任务消费

feign的性能优化、Feign的使用-最佳优化两种方案

2021年9月电子学会图形化三级编程题解析含答案:绘制图形

Open Office XML 格式中的 Style 设计原理

2021年9月电子学会图形化三级编程题解析含答案:计算平均分

Geometric g6 will carry harmonyos system, a comprehensive upgrade competitiveness of products

422B测试成功

Neo4j: 1. CQL statement
随机推荐
diff 命令
synApps -- Autosave
堆排序(Heap Sort)实现
OpenInfra Days China 2022即将开启,与 openEuler 共话开源技术
echart 股票数据分析 开发备忘录
元宇宙三巨头Animoca Brands、Yuga Labs、Gala多维度对比,谁才是未来?
A Preliminary Study on Pannellum, a Lightweight Panorama Viewer
Laravel 5.8笔记
Laravel 队列消费实例和定时任务添加任务消费
传音控股:目前公司手机产品暂无明确计划进入中国市场
torchvision.transforms
shake数据库中 启动报这个错,请问是哪里配置有问题吗?
CS231n: 12 Reinforcement Learning
Numpy函数、模块、类列表
hdu1042 N!(大数)
携手华为打造鲲鹏产业生态 | 麒麟信安亮相鲲鹏开发者创享日·长沙站
量子力学奇妙之旅-铁磁性来由/双态系统
PX4模块设计之十九:Replay模块
Oracle - table
run fscript with lua