leetcode 1678. Goal Parser Interpretation

发布时间:2026/8/2 11:01:42
leetcode 1678. Goal Parser Interpretation Problem: 1678. 设计 Goal 解析器遍历然后拼接起来就可以的Codeclass Solution { public: string interpret(string command) { int n command.size(); string ret; for(int i 0; i n; i) { if(command[i]G) { ret G; }else if(command[i]( command[i1])) { ret o; i; }else { ret al; i 3; } } return ret; } };