Skip to content

Instantly share code, notes, and snippets.

@pheuter
Created October 8, 2010 22:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pheuter/617675 to your computer and use it in GitHub Desktop.
Save pheuter/617675 to your computer and use it in GitHub Desktop.
import Data.List
main = print $ length . filter (\x -> sum x `elem` a) . filter (\x -> length x > 1) $ subsequences a
where a = [3, 4, 9, 14, 15, 19, 28, 37, 47, 50, 54, 56, 59, 61, 70, 73, 78, 81, 92, 95, 97, 99]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment