#include <string>
#include <vector>

using namespace std;

string solution(string s) {
    string answer = "";
    int leng = s.length();

    if(leng%2 ==0){
        for(int i=leng/2-1; i <=leng/2; i++)
            answer += s[i];
    }
    else
        answer = s[leng/2];
    return answer;
}

+ Recent posts