50分求调
查看原帖
50分求调
1370187
bananaandapple楼主2024/6/12 21:22
#include<bits/stdc++.h>
using namespace std;
char a1[90000];
int main()
{
    long long hh=0,ds=0,pd=0;
    for(int i=0;i>=0;i++){
        cin>>a1[i];
        if(a1[i]=='W'){
            hh++;
        }else if(a1[i]=='L'){
            ds++;
        }else if(a1[i]=='E'){
            cout<<hh<<":"<<ds<<endl;
            cout<<endl;
            pd=0;
            hh=0;
            ds=0;
            break;
        }
        pd++;
        if(pd==11){
            cout<<hh<<":"<<ds<<endl;
            pd=0;
            hh=0;
            ds=0;
        }
    }
    for(int i=0;i>=0;i++){
        if(a1[i]=='W'){
            hh++;
        }else if(a1[i]=='L'){
            ds++;
        }else if(a1[i]=='E'){
            cout<<hh<<":"<<ds<<endl;
            cout<<endl;
            break;
        }
        pd++;
        if(pd==21){
            cout<<hh<<":"<<ds<<endl;
            pd=0;
            hh=0;
            ds=0;
        }
    }
    return 0;  
}

2024/6/12 21:22
加载中...