challenge n人中m人が当選するくじ

n人の中から公平にm人を選ぶ、くじ引きプログラムを作ってください。

Posted feedbacks - Io

Ioを使ってみる.

1
lot := method(n, m, 1 to(n) asList shuffle slice(0, m))

Index

Feed

Other

Link

Pathtraq

loading...