``` #include using namespace std; const int N=1e5+10; int ans[N]; string a,b; int x[N],y[N]; void Plus(int ma){ memset(ans,0,sizeof(ans)); printf("加法结... ...
分类:
其他好文 时间:
2019-01-16 21:41:35
阅读次数:
197
给出2个大整数A,B,计算A+B的结果。 收起 给出2个大整数A,B,计算A+B的结果。 收起 给出2个大整数A,B,计算A+B的结果。 收起 给出2个大整数A,B,计算A+B的结果。 给出2个大整数A,B,计算A+B的结果。 输入 第1行:大数A 第2行:大数B (A,B的长度 <= 10000 ...
分类:
其他好文 时间:
2018-11-30 20:07:01
阅读次数:
158
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~ 本文由落影发表 前言 LeetCode上的题目是大公司面试常见的算法题,今天的目标是拿下5道算法题: 题目1是基于链表的大数加法,既考察基本数据结构的了解,又考察在处理加法过程中的边界处理; 题目2是求数组出现频率前k大的数字,考察思维能力 ...
分类:
编程语言 时间:
2018-11-26 20:18:13
阅读次数:
191
欢迎大家前往腾讯云+社区,获取更多腾讯海量技术实践干货哦~本文由落影发表前言LeetCode上的题目是大公司面试常见的算法题,今天的目标是拿下5道算法题:题目1是基于链表的大数加法,既考察基本数据结构的了解,又考察在处理加法过程中的边界处理;题目2是求数组出现频率前k大的数字,考察思维能力,代码很短;题目3是给出从两个数组中选择数字,组成一个最大的数字,考察的是贪心的思想;前三个都偏向于考察想法,
分类:
编程语言 时间:
2018-11-26 20:15:55
阅读次数:
209
1.加法 //A+B问题 #define _CRT_SECURE_NO_DEPRECATE #include<iostream> #include<cstdio> #include<cstring> using namespace std; char s1[1000], s2[1000]; void ...
分类:
其他好文 时间:
2018-11-20 20:48:49
阅读次数:
172
#include #include #include #include using namespace std; int main() { string str1; string str2; int jw=0; int arr[10005]; int l=0; int i; int num; cin... ...
分类:
其他好文 时间:
2018-10-14 01:58:38
阅读次数:
130
大数加法 hdu1002 #include <iostream> #include <cstdio> #include <string> #include <cstring> #include <cmath> #include <sstream> #include <algorithm> #incl ...
分类:
其他好文 时间:
2018-09-15 13:50:32
阅读次数:
196
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 ...
分类:
其他好文 时间:
2018-08-15 19:37:08
阅读次数:
165
#include #include #include #include #include using namespace std; string bigmun(string a,string b){ string c; reverse(a.begin(),a.end()); reverse(b.be... ...
分类:
其他好文 时间:
2018-08-10 12:28:02
阅读次数:
156