一个字符一个字符的输入。没什么好说的。错误原因:打少了一个0.
#include<cstdio>
char c;
long long a,b;
int main(){
c=getchar();
while(c!='+'){
if(c<='9'&&c>='0') a=a*10+c-48;
if(a>100000000) break;
c=getchar();
}
if(a>100000000) {
printf("Large");
return 0;
}
c=getchar();
while(c>0&&c!='\n'){
if(c<='9'&&c>='0') b=b*10+c-48;
if(b>100000000) break;
c=getchar();
}
if(b>100000000||a+b>100000000){
printf("Large");
return 0;
}
printf("%lld",a+b);
}