stoi()
https://www.cplusplus.com/reference/string/stoi/
str.substr()
https://www.cplusplus.com/reference/string/string/substr/
str.erase()
https://www.cplusplus.com/reference/string/string/erase/
這題不難,加油!