这道题也没什么好说的,直接DFS就可以了,只是要注意一句话“The aim is to use some arithmetic on (some of) the five numbers to form the target number.”,注意黑体的some of。
代码(几乎没剪枝):
这道题也没什么好说的,直接DFS就可以了,只是要注意一句话“The aim is to use some arithmetic on (some of) the five numbers to form the target number.”,注意黑体的some of。
代码(几乎没剪枝):