开始 2024-08-20 08:00:00

8.19-8.24集训第二天

结束 2024-08-25 00:00:00
Contest is over.
当前 2025-04-05 07:04:57

B--被限制加法(代码)*还没开始测评,不确定是否正确

include

using namespace std; int main() {

int a=0,b=0,n,a1,b1;
cin>>n;
for(int i=1;i<=n;i++)
{
	//cout<<"A="<<a<<endl;
	//cout<<"B="<<b<<endl;
	//cout<<"__________________________________"<<endl;
	cin>>a1;
	a=a+a1;
	a=a*10;
	cin>>b1;
	b=b+b1;
	b=b*10;
}
cout<<a/10+b/10;

}


luzeming  •  7个月前

include

using namespace std; int main() {

int a=0,b=0,n,a1,b1; cin>>n; for(int i=1;i<=n;i++) {

//cout<<"A="<<a<<endl;
//cout<<"B="<<b<<endl;
//cout<<"__________________________________"<<endl;
cin>>a1;
a=a+a1;
a=a*10;
cin>>b1;
b=b+b1;
b=b*10;

} cout<<a/10+b/10;


laiziyang  •  7个月前

include

using namespace std; int main() {

int a=0,b=0,n,a1,b1; cin>>n; for(int i=1;i<=n;i++) {

//cout<<"A="<<a<<endl;
//cout<<"B="<<b<<endl;
//cout<<"__________________________________"<<endl;
cin>>a1;
a=a+a1;
a=a*10;
cin>>b1;
b=b+b1;
b=b*10;

} cout<<a/10+b/10;


laiziyang  •  7个月前

include

using namespace std; int main() {

int a=0,b=0,n,a1,b1; cin>>n; for(int i=1;i<=n;i++) {

//cout<<"A="<<a<<endl;
//cout<<"B="<<b<<endl;
//cout<<"__________________________________"<<endl;
cin>>a1;
a=a+a1;
a=a*10;
cin>>b1;
b=b+b1;
b=b*10;

} cout<<a/10+b/10;


laiziyang  •  7个月前

比赛已结束。