Skip to main content
added 77 characters in body
Source Link
histocrat
  • 22.3k
  • 4
  • 38
  • 80

Ruby, 3333 32

p( *[*1..69].sample(5),rand(26)+1)

Ruby happens to have a built-in method, sample, that selects random values from an array without replacement. Thanks to QPaysTaxes for pointing out that I don't need the parens.

Ruby, 33

p(*[*1..69].sample(5),rand(26)+1)

Ruby happens to have a built-in method, sample, that selects random values from an array without replacement.

Ruby, 33 32

p *[*1..69].sample(5),rand(26)+1

Ruby happens to have a built-in method, sample, that selects random values from an array without replacement. Thanks to QPaysTaxes for pointing out that I don't need the parens.

edited body
Source Link
histocrat
  • 22.3k
  • 4
  • 38
  • 80

Ruby, 33

p(*[*1..69].sample(5),rand(2826)+1)

Ruby happens to have a built-in method, sample, that selects random values from an array without replacement.

Ruby, 33

p(*[*1..69].sample(5),rand(28)+1)

Ruby happens to have a built-in method, sample, that selects random values from an array without replacement.

Ruby, 33

p(*[*1..69].sample(5),rand(26)+1)

Ruby happens to have a built-in method, sample, that selects random values from an array without replacement.

Source Link
histocrat
  • 22.3k
  • 4
  • 38
  • 80

Ruby, 33

p(*[*1..69].sample(5),rand(28)+1)

Ruby happens to have a built-in method, sample, that selects random values from an array without replacement.