小X的加法难题
.
.
.
.
.
程序:

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
long long s1=0,s2=0,s3=0;
int bz=0;
char x;
int main()
{
	while (cin>>x)
	{
		if (x=='+')
		{
			bz=1;
			continue;
		}
		if (bz==0) s1=s1*10+(x-'0');
		if (bz==1) s2=s2*10+(x-'0');
	}
	s3=s1+s2;
	if (s3>100000000) printf("Large"); else printf("%lld",s3);
	return 0;
}

相关文章:

  • 2021-12-01
  • 2022-12-23
  • 2022-01-20
  • 2022-02-12
  • 2021-10-07
  • 2021-05-22
  • 2021-08-21
  • 2022-03-04
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-18
  • 2021-10-24
  • 2021-10-05
  • 2021-09-17
  • 2021-09-25
相关资源
相似解决方案