- haystack = []
- 0.upto(100) do |i|
- 0.upto(100) do |j|
- 0.upto(100) do |k|
- 0.upto(100) do |l|
- test = [i,j,k,l].sort
- unless haystack.include? test
- puts "#{test.join(', ')}\n" if test.inject(&:+) == 100
- haystack << test
- end
- end
- end
- end
- end
- puts "========"
- puts haystack.size