Description
Given four numbers, can you get twenty-four through the addition, subtraction, multiplication, and division? Each number can be used only once.
?
Input
The input consists of multiple test cases. Each test case contains 4 integers A, B, C, D in a single line (1 <= A, B, C, D <= 13).
?
Output
For each case, print the “Yes” or “No”. If twenty-four point can be get, print “Yes”, otherwise, print “No”.
?
Sample Input
2 2 3 9
1 1 1 1
5 5 5 1
Sample Output
Yes
No
Yes
HINT
?
For the first sample, (2/3+2)*9=24.
?
Source
题意:四个数字,通过四则运算看能不能得到24点
思路:对于如此小量的数,直接暴搜,你不需要怀疑人生
#include
#include
#include
#include
#include
#include