Submission details
Task:Palindromi
Sender:drvilepis
Submission time:2025-10-27 10:37:50 +0200
Language:C++ (C++20)
Status:COMPILE ERROR

Compiler report

input/code.cpp:19:1: error: expected unqualified-id before numeric constant
   19 | 20
      | ^~

Code

#include <iostream>
#include <string>
int main() {
    std::string input;
    std::cin >> input;

    int len = input.size();
    int middle = len/2;
    int ans = 0;

    for (int i = 0; i < middle; i++) {
       if (input[i] != input[len-1-i]) {
            ans++;
       }
    }

    std::cout << ans << "\n";
}
20