
大数
nucleare
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
n的阶乘
链接:https://www.nowcoder.com/acm/contest/75/E来源:牛客网题目描述给定一个整数N(0≤N≤10000),求取N的阶乘输入描述:多个测试数据,每个测试数据输入一个数N输出描述:每组用一行输出N的阶乘示例1输入1 2 3输出1 2 6代码:#include<bits/stdc++.h> using namespace std; int main(...原创 2018-03-29 20:30:19 · 1360 阅读 · 0 评论 -
大整数乘法
#include<iostream> #include<cstdio> #include<string> using namespace std; void solve() { string s1; string s2; int ans[500]={0}; int a[250]={0}; int b[250]={0}; cin>>s1...原创 2018-05-14 20:29:39 · 128 阅读 · 0 评论 -
a==b? java
A == B ? HDU - 2054 Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Input each test case contains two numbers A and B. Output for each case, if A is e...原创 2018-10-09 20:43:39 · 661 阅读 · 0 评论 -
大数加法 51Nod - 1005
大数加法 51Nod - 1005 给出2个大整数A,B,计算A+B的结果。 Input 第1行:大数A 第2行:大数B (A,B的长度 <= 10000 需注意:A B有可能为负数) Output 输出A + B Sample Input 68932147586 468711654886 Sample Output 537643802472 import...原创 2018-10-09 21:15:03 · 207 阅读 · 0 评论 -
大菲波数 HDU - 1715
Fibonacci数列,定义如下: f(1)=f(2)=1 f(n)=f(n-1)+f(n-2) n>=3。 计算第n项Fibonacci数值。 Input 输入第一行为一个整数N,接下来N行为整数Pi(1<=Pi<=1000)。 Output 输出为N行,每行为对应的f(Pi)。 Sample Input 5 1 2 3 4 5 Sample Out...原创 2018-10-09 21:35:15 · 168 阅读 · 0 评论 -
A/B HDU - 1576
A/B HDU - 1576 要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。 Input 数据的第一行是一个T,表示有T组数据。 每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 10^9)。 Output 对应每组数据输出(A/B)%9973...原创 2018-10-09 22:00:18 · 211 阅读 · 0 评论 -
Lucky Man ZOJ - 4005 (JAVA大整数+牛顿迭代法开根)
Lucky Man ZOJ - 4005 BaoBao is keen on collection. Recently he is abandoning himself to Kantai Collection, especially to collecting cute girls, known as "Fleet Girls". There are various types ...原创 2018-10-22 21:28:48 · 524 阅读 · 0 评论 -
Game of Taking Stones HDU - 5973 (威佐夫博弈+Java的高精度)
Game of Taking Stones HDU - 5973 Two people face two piles of stones and make a game. They take turns to take stones. As game rules, there are two different methods of taking stones: One scheme is...转载 2018-10-23 21:12:46 · 221 阅读 · 0 评论