8

h2022027 2023-10-14 20:50:24

#include <bits/stdc++.h> using namespace std; string s; int main() { char c; while (cin >> c) { if (c == 'E') break; s += c; } // 11分制 int w = 0, l = 0; for (int i = 0; i < s.size(); i++) { if (s[i] == 'W') w = w + 1; else l = l + 1; if (w >= 11 || 1 >= 11) { if (w > l && w - 1 >= 2) { cout << w << ':' << l << endl; w = l = 0; } if (l > w && l - w >= 2) { cout << w << ':' << l << endl; w = l = 0; } } }

return 0;

}