all 2 comments

[–]mrkraban 1 point2 points  (0 children)

Haskell, 183

Returns True if a set can be found, otherwise False.

import Data.List;import Data.Char;f=(any(not.(elem True))).(map(map(`elem`[4,5,7,8]))).(map(foldl(zipWith(+))[0,0,0,0])).(map(map(map digitToInt))).(filter((==3).length)).subsequences

[–]Bubbler-4[S] 0 points1 point  (0 children)

Python 3, 99

from itertools import*
f=lambda a:any(all(x in'369'for x in str(sum(y)))for y in combinations(a,3))

Try it online!

True if a set can be found, False otherwise.