复习资料01
余姚真题1425 1.班级对抗 (fight.pas/c/cpp)
#include<bits/stdc++.h>
using namespace std;
int main(){
int n,m,a,s=0,t=0;
cin>>n; while(n--){cin>>a;s+=a;}
cin>>m; while(m--){cin>>a;t+=a;}
if(s>t)cout<<"A"<<endl; else cout<<"B"<<endl;
cout<<s<<" "<<t<<endl;
return 0;
}

浙公网安备 33010602011771号