提交时间:2024-08-20 08:30:19

运行 ID: 168229

#include<iostream> 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; }