B.cpp 359 B

12345678910111213141516171819
  1. #include<iostream>
  2. #include<string>
  3. #include<algorithm>
  4. using namespace std;
  5. int main() {
  6. for (string s; cin >> s;) {
  7. char c_max = *max_element(s.begin(), s.end());
  8. for (char c : s) {
  9. cout << c;
  10. if (c == c_max) {
  11. cout << "(max)";
  12. }
  13. }
  14. cout << endl;
  15. }
  16. return 0;
  17. }