wip
Alpha Chen 9 years ago
parent 7704aa75a1
commit 0c78a493d6

@ -0,0 +1,23 @@
buckets = DATA.read.split("\n").map(&:to_i)
puts (1..buckets.size).map {|i| buckets.combination(i).select {|p| p.inject(:+) == 150 }.size }.inject(:+)
__END__
50
44
11
49
42
46
18
32
26
40
21
7
18
43
10
47
36
24
22
40
Loading…
Cancel
Save