Sign up, and you'll be able to vote in polls. Sign upIt appears that your browser timezone is different than what is currently being used. Do you want to switch to UTC? Change timezone
Jan 13, 2025
10:08:21pm
SalmonOfCapistrano All-American
I think it's clear IMO
my solution...

int myRandom() {
while(true) {
int rand = random();
if (rand < 5) {
return rand % 2;
}
}
}


There might be some subtleties with negative numbers, I dunno...
This message has been modified
Originally posted on Jan 13, 2025 at 10:08:21pm
Message modified by SalmonOfCapistrano on Jan 13, 2025 at 10:08:57pm
SalmonOfCapistrano
Previous username
Pedant
Bio page
SalmonOfCapistrano
Joined
Feb 1, 2012
Last login
Jan 29, 2025
Total posts
11,345 (81 FO)
Messages
Author
Time
Jan 13, 10:03pm
Jan 13, 10:03pm

Posting on CougarBoard

In order to post, you will need to either sign up or log in.