# 还是A+B

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 18349    Accepted Submission(s): 8917

Problem Description

Input

Output

Sample Input
1 2 1 11 21 1 108 8 2 36 64 3 0 0 1

Sample Output
3 -1 -1 100

Source

Recommend
JGShining   |   We have carefully selected several similar problems for you:  1230 1237 1753 1555 1757

...：

#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
using namespace std;
int n,m,j,k,l,i,a,b;
int main()
{
while(scanf("%d%d%d",&a,&b,&k),a+b)
{
l=pow(10,k);
if(a%l==b%l)
printf("-1\n");
else
printf("%d\n",a+b);
}
}

#### 【杭电】[1229]还是A+B

2016-03-01 23:08:10

#### 杭电1229 还是A+B

2010-10-07 16:01:00

#### 杭电-1229还是A+B

2015-12-01 18:40:51

#### 杭电ACM 1229 还是A+B

2012-11-12 01:34:35

#### 杭电OJ——1229 还是A+B

2013-01-20 17:14:56

#### 杭电1229题还是A+B

2016-12-22 20:17:26

#### 杭电Hd 1229 还是A+B

2013-01-06 15:15:49

#### 杭电1000- A+B Problem

2015-09-16 21:49:39

#### 杭电ACM-A+B problem

2017-10-14 22:57:29

#### 杭电oj有关a+b的问题

2016-07-16 13:40:27