复习资料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;
}

  

 

posted @ 2016-05-22 08:56  codeisking  阅读(693)  评论(0)    收藏  举报