stoi와 같은 문자열 정수 변환 함수를 알고 있다면 쉽게 풀 수 있는 문제이다.
#include <string> #include <vector> using namespace std; int solution(string s) { return stoi(s); }