#include #include #include using namespace std; string solution(string n_str) { string answer = n_str; // Find the first non-zero character size_t pos = answer.find_first_not_of('0'); // Remove leading zeros if (pos != string::npos) { answer = answer.substr(pos); } else { // If the string is all zeros, keep a single zero answer = "0"; } return answer; } 해당 코드는 string 0이 아닌 처음 위치를 알아서 그위치 뒤의 반환하는 것...