标签:
3 99 72 45 27 39 18
27 18 21
代码:
01.
#include<iostream>
02.
#include<string>
03.
using
namespace
std;
04.
int
main()
05.
{
06.
int
t;
07.
cin>>t;
08.
while
(t--)
09.
{
10.
string a,b;
11.
int
i,sum=0;
12.
cin>>a>>b;
13.
for
(i =0;i <a.length();i++)
14.
sum += a[i] -
‘0‘
;
15.
for
(i = 0;i < b.length();i++)
16.
sum += b[i] -
‘0‘
;
17.
cout<<sum<<endl;
18.
}
19.
return
0;
20.
}
标签:
原文地址:http://blog.csdn.net/u012701023/article/details/46044863