
大数
team39
喜欢写注释
展开
-
简单易懂的 ——大数除法
a 为被除数、b为除数、r为商 #include<cstdio> #include<string> #include<cstdlib> #include<cstring> #include<iostream> #include<algorithm> using namespace std; #define mem(a,b)...原创 2023-02-14 09:53:06 · 351 阅读 · 1 评论 -
大数加法 (a,b,c,d可能为负数)
大数加法 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 给出4个大整数A,B,C,D,计算A+B+C+D的结果。 Input A, B, C and D(-2^61 <= A,B,C,D<=2^61) Output 输出A + B + C + D Input示例 1 1 2 3 4 Output示例 10 #incl...原创 2018-01-12 20:32:27 · 624 阅读 · 0 评论 -
大数乘法(A * B Problem Plus )
A * B Problem Plus Calculate A * B. InputEach line will contain two integers A and B. Process to end of file.Note: the length of each integer will not exceed 50000. OutputFor each ca...原创 2017-11-22 19:49:17 · 385 阅读 · 0 评论 -
大菲波数
大菲波数 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 Input5 1 2 3 4 5Sam...原创 2017-11-11 18:54:00 · 183 阅读 · 0 评论