No, it doesn't.Hey it may not be your answer but it still works
"The number of times we see one is once, 2 is a number higher than one" - wait, that's two ones, so once is not correct! Nuh.
Moderator:Æron
No, it doesn't.Hey it may not be your answer but it still works
*raises hand* Me me me me meeee. Here's the code again.Someone else wrote some code and found it to be "3, 2, 3, 1, 1."
Code: Select all
my $n = 6;
for my $one (1..$n) {
for my $two (1..$n) {
for my $three (1..$n) {
for my $four (1..$n) {
for my $five (1..$n) {
my @t = (0, 1, 1, 1, 1, 1);
$t[$_] += 1 for (0, $one, $two, $three, $four, $five);
if (($t[1] == $one)
&& ($t[2] == $two)
&& ($t[3] == $three)
&& ($t[4] == $four)
&& ($t[5] == $five)) {
print "$one, $two, $three, $four, $five\n";
exit(0);
} # if
} # for
} # for
} # for
} # for
} # for
print "Unsolvable for n(1,$n)\n";
exit(1);
*** Topic is Roadrunners! Discuss.
*** Channel mode is +sntr
<KJ_Fellie> *yerf*
<KJ_Fellie> Santa says "Hi"
<KJ_Fellie> ...
*** Shadowpillar has joined #definecynical
<KJ_Fellie> *yerf*
<KJ_Fellie> This is even less eventful than the FIRST time I came here. Maybe that's because it's Christmas.
<KJ_Fellie> Santa says hi, by the way.
<KJ_Fellie> *Santa hands KJ_Fellie a nice lump of coal*
<KJ_Fellie> Is this because I ate all the cookies? Or is it because you had to come in through the cat door?
<KJ_Fellie> *Santa hands KJ_Fellie another lump of coal*
<KJ_Fellie> Oh. This is about all those haikus, isn't it?
<KJ_Fellie> *Santa nods*
<KJ_Fellie> *Santa stuffs the ninja penguin's stocking with a handful of shiny new shurikens*
*** Shadowpillar has quit (Ping timeout)
<KJ_Fellie> Ninjas are always on the "Nice" list... *grin*
<KJ_Fellie> ...
You have bad timing.Hate to necro, but it seems I did manage to kill another thread.
Here's one I thought should be in here...*** Topic is Roadrunners! Discuss.
*** Channel mode is +sntr
<KJ_Fellie> *yerf*
<KJ_Fellie> Santa says "Hi"
<KJ_Fellie> ...
*** Shadowpillar has joined #definecynical
<KJ_Fellie> *yerf*
<KJ_Fellie> This is even less eventful than the FIRST time I came here. Maybe that's because it's Christmas.
<KJ_Fellie> Santa says hi, by the way.
<KJ_Fellie> *Santa hands KJ_Fellie a nice lump of coal*
<KJ_Fellie> Is this because I ate all the cookies? Or is it because you had to come in through the cat door?
<KJ_Fellie> *Santa hands KJ_Fellie another lump of coal*
<KJ_Fellie> Oh. This is about all those haikus, isn't it?
<KJ_Fellie> *Santa nods*
<KJ_Fellie> *Santa stuffs the ninja penguin's stocking with a handful of shiny new shurikens*
*** Shadowpillar has quit (Ping timeout)
<KJ_Fellie> Ninjas are always on the "Nice" list... *grin*
<KJ_Fellie> ...
Users browsing this forum: No registered users and 13 guests