#include<iostream>
#include<list>
#include<string>
using namespace std; list<int> BigAddList(list<int> La,list<int> Lb )
{
list<int> Lc;
list<int> ::iterator it1,it2;
it1=La.begin();
it2=Lb.begin(); int carry=;
while(it1!=La.end()||it2!=Lb.end())
{
int c=carry;
if(it1!=La.end())
{
c=c+(*it1);
it1++;
}
if(it2!=Lb.end())
{
c=c+(*it2);
it2++;
}
carry=c/;
Lc.push_back(c%);
}
if(carry>) Lc.push_back(carry);
return Lc;
} int main()
{
int i,T;
cin>>T;
for(int j=;j<T;j++)
{
string s,t;
cin>>s>>t;
list<int>La,Lb,Lc; for(i=;i<s.size();i++)
{
La.push_front(s[i]-''); }
for(i=;i<t.size();i++)
Lb.push_front(t[i]-''); Lc=BigAddList(La,Lb);
Lc.reverse(); for(list<int>::iterator it=Lc.begin();it!=Lc.end();it++)
{
cout<<*it; }
cout<<endl;
}
}

最新文章

  1. 再谈JavaScript闭包及应用
  2. cocos2dx 3.x(移动修改精灵坐标MoveTo与MoveBy)
  3. 菜鸟教程之工具使用(十)——用BlazeMeter录制JMeter测试脚本
  4. ReentrantLock
  5. 【python】Python 3 +pycharm中文支持解决方案
  6. apache开源项目--kafka
  7. (图文教程)帝国cms7.0列表页模板调用多说评论次数
  8. # Consumed parameters
  9. Pandas 错误笔记(持续更新)
  10. 面向对象(__str__和__repr__方法)
  11. Android OpenSL ES 开发:OpenSL ES利用SoundTouch实现PCM音频的变速和变调
  12. IO流的种类
  13. iOS - 跳转到系统设置
  14. Div里超出部分,省略号显示
  15. python第四十四课——继承性之单继承
  16. 语义化的HTML及其目的
  17. STM32 硬件UART接收超时检测设置
  18. JavaScript四种数值取整方法
  19. 20.Add Two Numbers(两个链表的和)
  20. Mybatis详解

热门文章

  1. UnicodeMath编码教程
  2. Bytom 移动端钱包SDK FAQ
  3. SpringMVC 搭建
  4. LINQ解析
  5. shell脚本中if
  6. English trip V2 - A 1. Fastival Teacher:Julia Key:
  7. 不正常退出vim产生swp文件的解决方法
  8. 基于TCAM 的高速路由查找
  9. mpvue构建小程序(步骤+地址)
  10. SSH服务器拒绝了密码