.. _ABC126: `ABC 126 Editorial `_ =============================================================== .. _ABC126A: `Problem A: Changing a Character `_ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The key here is to print all the characters as they are, and change the one at index `k-1`. This character will be lowercased. We will use C++ `lowercase` function to achieve this. Code is below: .. code-block:: C++ :linenos: #include using namespace std; int main () { int n, k; string s; cin >> n >> k >> s; for (int i=0; i< n; i++) { if (i == k-1) putchar( tolower(s[i]) ); else putchar(s[i]); } return 0; return 0; }