#54732: c++解答


yp11451009@yphs.tp.edu.tw (711-19王敬皓)


c++

 

#include<iostream>
using namespace std;
int main(){
    int a,b,c,d,w=0,h,g;
    for(int i=1;i<=2;i++){
        cin>>a>>b>>c>>d;
        h=a+b+c+d;
        cin>>a>>b>>c>>d;
        g=a+b+c+d;
        if(h>g) w++;
        cout<<h<<":"<<g<<endl;
    }
    if(w==2) cout<<"Win"<<endl;
    else if(w==1) cout<<"Tie"<<endl;
    else cout << "Lose"<<endl;
}