一种很新的a+b problem P1001
废话不多说,上代码!!!
#include<iostream>
using namespace std;
int main()
{
int retVal;
retVal=0;
long long a;
long long b;
long long ans;
ans=0;
cin>>a;
cin>>b;
int i;
i=1;
for(;;)
{
if(i==a)
{
break;
}
else
{
i++;
}
}
int j;
j=1;
for(;;)
{
if(j==b)
{
break;
}
else
{
j++;
}
}
ans=i+j;
cout<<ans;
return retVal;
}42行。。。
nb
注:会超时