<swustoj>?id=1156 A+B Problem

链接http://acm.swust.edu.cn/problem/1156/

#include <stdio.h>
#include <string.h>
int main()
{
    int n;
    char s1[200],s2[200];
    while(scanf("%s %s",s1,s2)!=EOF)
    {
        if(s1[1]=='\0')
        {
            s1[1]=s1[0];
            s1[0]='0';
            s1[2]='\0';
        }
        if(s2[1]=='\0')
        {
            s2[1]=s2[0];
            s2[0]='0';
            s2[2]='\0';
        }
        printf("%d\n",((s1[0]-'0')*10+(s1[1]-'0')+(s2[0]-'0')*10+(s2[1]-'0')));
    }
    return 0;
}

 

posted @ 2016-07-31 21:56  艹kiss灬不离  阅读(278)  评论(0)    收藏  举报