当前位置:网站首页>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了
边栏推荐
- 阿里云数据库PolarDB开源人才培养计划发布!万元好礼等你来拿!
- 常用字符的编码
- DHCP服务初探
- Flush can buy stock?Is it safe to buy stocks?
- 关于SBOM最基础元素,你需要知道的(Part I)
- Redis之SDS数据结构
- Nioke 2022 Summer Multi-School 6 B Eezie and Pie (Difference on the tree + multiplication to find the kth ancestor board)
- 数据压缩和归档(三)、tarfile
- Redis Server启动过程
- 16. Learn Lua file I/O together
猜你喜欢
随机推荐
PX4模块设计之十九:Replay模块
面经刺客 | 关于——字节飞书基础架构产品 日常实习面经
微信小程序云开发 | 插件的微信小程序云开发
hdu1042 N!(大数)
MIMO雷达波束赋形
QT With OpenGL (Bloom) (Bloom)
行政区划代码(道路要素)
01. Preface
第4讲:SQL语句之DDL类型的数据库定义语言
Why do you need to cross compiler
ORACLE子查询 导致无法谓词推入的研究
21天学习挑战赛——机器学习03
El - tree set radio, click finish after assemble
Learn about layered architecture & SOA architecture together
请问shake数据库中mongoshake同步过程中,src_mongo挂了,同步服务不会退出吗?
Lecture 4: Database Definition Language of DDL Type of SQL Statements
2021年9月电子学会图形化三级编程题解析含答案:接红包游戏
JVM内存模型和结构详解(五大模型图解)
Transsion Holdings: At present, there is no clear plan for the company's mobile phone products to enter the Chinese market
响应式pbootcms模板建筑装饰类网站









