mu
change
commit 964559d0eaa1f337135427ccb3e090a3b5f19154
author Alpha Chen <alpha@kejadlen.dev>
date
parent c04986d1
diff --git a/cant-stop.rb b/cant-stop.rb
new file mode 100644
index 0000000..418b6b0
--- /dev/null
+++ b/cant-stop.rb
@@ -0,0 +1,8 @@
+die = (1..6).to_a
+
+p 100_000.times.each.with_object({}) {|_,h|
+  roll = Array.new(4) { die.sample }
+  pairs = roll.combination(2)
+  sums = pairs.map(&:sum)
+  h.merge!(sums.tally) { _2 + _3 } unless sums.include?(7)
+}.sort_by(&:last).to_h