题目:

题解:
func evalRPN(tokens []string) int {
stack := make([]int, (len(tokens)+1)/2)
index := -1
for _, token := range tokens {
val, err := strconv.Atoi(token)
if err == nil {
index++
stack[index] = val
} else {
index--
switch token {
case "+":
stack[index] += stack[index+1]
case "-":
stack[index] -= stack[index+1]
case "*":
stack[index] *= stack[index+1]
default:
stack[index] /= stack[index+1]
}
}
}
return stack[0]
}


![[大模型]Phi-3-mini-4k-Instruct Lora 微调](https://img-blog.csdnimg.cn/direct/94a56dc0f9184650b24deb95bd79f5ec.png#pic_center)















