15 lines
231 B
Text
15 lines
231 B
Text
function randN ( [int]$N )
|
|
{
|
|
[int]( ( Get-Random -Maximum $N ) -eq 0 )
|
|
}
|
|
|
|
function unbiased ( [int]$N )
|
|
{
|
|
do {
|
|
$X = randN $N
|
|
$Y = randN $N
|
|
}
|
|
While ( $X -eq $Y )
|
|
|
|
return $X
|
|
}
|