[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Omaha.pm] RE: figure this one out
From: Patrick Baker [mailto:bakep@cox.net]
>
> http://www.mrgoodbeer.com/games/wacko.shtml
>
> Woah.
-spoiler attached-
Play the game above first if you want to.
---
(I spent about 8 minutes on this.)
Run the math on all possible choices:
#!/usr/bin/perl
foreach $pick (10..99) {
($a, $b) = ($pick =~ /(\d)(\d)/);
$result = $pick - ($a + $b);
print "$pick: $result\n";
}
No matter what number you pick, there are only 9 possible results. If you look at the pictures associated with those 9 results, they're all the same. The game changes which picture will be the answer for each run, but there's only 1 possible answer, and that's the result it "guesses".
j