#include <stdio.h>
#include <string.h>
int Trans(char A[]){
int a=0,len = strlen(A);
for(int i=0;i<len;i++){
if(A[i]>='0' && A[i]<='9')
a=a*10+A[i]-'0';
}
if(A[0] == '-')
a=-1*a;
return a;
}
int main()
{
char A[12],B[12];
while(scanf("%s %s",A,B)!= EOF){
int a=Trans(A);
int b=Trans(B);
printf("%d\n",a+b);
}
return 0;
}
/**************************************************************
Problem: 1003
User: cust123
Language: C++
Result: Accepted
Time:0 ms
Memory:1020 kb
****************************************************************/
题目1003:A+B
最新推荐文章于 2022-01-26 13:46:39 发布