fork download
  1. p [*0..9].repeated_permutation(4).group_by(&:sum).transform_values(&:size)
Success #stdin #stdout 0.01s 7108KB
stdin
Standard input is empty
stdout
{0=>1, 1=>4, 2=>10, 3=>20, 4=>35, 5=>56, 6=>84, 7=>120, 8=>165, 9=>220, 10=>282, 11=>348, 12=>415, 13=>480, 14=>540, 15=>592, 16=>633, 17=>660, 18=>670, 19=>660, 20=>633, 21=>592, 22=>540, 23=>480, 24=>415, 25=>348, 26=>282, 27=>220, 28=>165, 29=>120, 30=>84, 31=>56, 32=>35, 33=>20, 34=>10, 35=>4, 36=>1}