Quick actions

cmd+k|ctrl+k

Navigation

Languages

作弊骰子:出現 1、2、3 的機率是 4、5、6 的 1.1 倍

Snippet info

Language

Raku

Visibility

public

Author

frank576frank576frank576

Created

2017-05-12T13:36:10Z

Updated

2017-05-12T13:37:10Z

my %count;
my @face = ( loop { 1 + [%] (rand * 100).round(1) , 63 , 6 } )[ ^100000 ];
%count{ $_ }++ for @face;
say %count;
"1.2.3的總數除以4.5.6的總數 = { ([+] %count{1..3} ) / ([+] %count{4..6}) }".say;
INFO