1 solutions

  • 0
    @ 2025-3-3 16:27:11

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    
    int s1,s2;//两人获胜场次 
    int f1,f2;//两人每次拿到的棋子的值 
    
    int main() {
    //	freopen("test8.in","r",stdin);
    //	freopen("test8.out","w",stdout);
    	
    	    for(int i = 1;i <= 3;i++){
        	cin>>f1>>f2;
        	
        	if(f1==7&&f2==1){
        		s2++;
    		}else if(f1==1&&f2==7){
    			s1++;	
    		}else if(f1>f2){
    			s1++;
    		}else if(f1 != f2){
    			s2++;
    		}
    	}
    	
    	if(s1 > s2){
    		cout<<"Win";
    	}else if(s1 == s2){
    		cout<<"Tie";
    	}else{
    		cout<<"Lose";
    	}
    
    	
    	return 0;
    }
    
    
    • 1

    Information

    ID
    10123
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By