大数
文章平均质量分 68
Scarlett在努力
互联网爱好者
展开
-
杭电1133 Buy the Ticket(大数,递推)
The "Harry Potter and the Goblet of Fire" will be on show in the next few days. As a crazy fan of Harry Potter, you will go to the cinema and have the first sight, won’t you? Suppose the cinema onl原创 2015-08-07 18:11:55 · 663 阅读 · 0 评论 -
杭电HDU 1042大数阶乘N!
Problem Description Given an integer N(0 ≤ N ≤ 10000), your task is to calculate N! Input One N in one line, process to the end of file. Output For each N, output N! in one line.原创 2015-07-30 14:02:40 · 661 阅读 · 0 评论 -
杭电1002 大数相加
Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contains an integer T(1<=T<原创 2015-07-28 16:59:47 · 617 阅读 · 0 评论 -
大明A+B
话说,经过了漫长的一个多月,小明已经成长了许多,所以他改了一个名字叫“大明”。 这时他已经不是那个只会做100以内加法的那个“小明”了,现在他甚至会任意长度的正小数的加法。 现在,给你两个正的小数A和B,你的任务是代表大明计算出A+B的值。 Input 本题目包含多组测试数据,请处理到文件结束。 每一组测试数据在一行里面包含两个长度不大于400的正小数A和B。原创 2015-08-06 18:07:11 · 1197 阅读 · 0 评论 -
大菲薄那次数
Fibonacci数列,定义如下: f(1)=f(2)=1 f(n)=f(n-1)+f(n-2) n>=3。 计算第n项Fibonacci数值。 Input 输入第一行为一个整数N,接下来N行为整数Pi(1 Output 输出为N行,每行为对应的f(Pi)。 Sample Input 5 1 2 3 4 5 Sample Output原创 2015-08-06 23:35:41 · 504 阅读 · 0 评论 -
将十进制无符号整数转化为任意进制数(大数)
大数进制转换: #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define INF (INT_MAX / 10) #d原创 2015-09-29 23:05:02 · 931 阅读 · 0 评论 -
BZOJ 仪仗队 (线性筛欧拉函数)
Time Limit: 1 Sec Memory Limit: 128 MB Submit: 72 Solved: 3 Description 小明参加了这次运动会方阵的训练。 方阵是由学生组成的N * N的正方形点阵,小明跟在方阵的左后方,小明可根据其视线所及的学生人数来判断队伍是否整齐。 现在,小D希望你告诉他队伍整齐时小明能看到的学生人数。 Input原创 2016-04-09 11:07:59 · 542 阅读 · 0 评论