'''

```
def judgePoint24(self, nums):
"""
:type nums: List[int]
:rtype: bool
"""
def dd(a,b):
return [a+b,max(a-b,b-a),a*b,a/b if b!=0 else a,b/a if a!=0 else b]
def ddd(x):
a=x[0]
b=x[2]
c=x[1]
return [j for i in dd(a,b)for j in dd(c,i)]+[j for i in dd(a,c)for j in dd(b,i)]+[j for i in dd(c,b)for j in dd(a,i)]
def ha31():
for i in range(4):
for k in ddd(nums[0:i]+nums[i+1:4]):
for m in dd(k,nums[i]):
yield m
def ha22():
f=[]
for i in range(3):
for j in range(i+1,4):
for k in dd(nums[i],nums[j]):
c=nums[:]
c.pop(i)
c.pop(j-1)
for m in dd(c[0],c[1]):
for p in dd(k,m):
yield p
for i in ha22():
if i==24:
return True
for i in ha31():
if i==24:
return True
return False
```

'''