Of course, sorry. That's what I meant.Quote:
Originally posted by Simon666
It only means that not both numbers at the same time can be prime.
Printable View
Of course, sorry. That's what I meant.Quote:
Originally posted by Simon666
It only means that not both numbers at the same time can be prime.
are the numbers 2 and 9
tell me if they are and i'll explain why
2 and 9 are not correct
can one of the numbers be 2Quote:
Originally posted by Elrond
2 and 9 are not correct
@SeventhStar: based on your strategy, I have worked out an algorithm which should work:Quote:
Originally posted by SeventhStar
can one of the numbers be 2
:D :D :DCode:for(int a = 2; a <= 100; a++)
{
for(int b = 2; b <= 100; b++)
{
AskElrondIfCanBe(a,b);
}
}
Nope i thought of a great idea but the promlem is that if one of the nubers can be 2 i have too much answersQuote:
Originally posted by gstercken
@SeventhStar: based on your strategy, I have worked out an algorithm which should work:
:D :D :DCode:for(int a = 2; a <= 100; a++)
{
for(int b = 2; b <= 100; b++)
{
AskElrondIfCanBe(a,b);
}
}
PS. you can remove these '{}' thingies
I have an even more efficient one:
:D:D:DCode:for(int a = 2; a <= 100; a++)
{
for(int b = a+1; b <= 100; b++)
{
AskElrondIfCanBe(a,b);
}
}
Solve first, optimize later! :DQuote:
Originally posted by Simon666
I have an even more efficient one:
:D:D:DCode:for(int a = 2; a <= 100; a++)
{
for(int b = a+1; b <= 100; b++)
{
AskElrondIfCanBe(a,b);
}
}
I like them. They keep the code much cleaner, IMHO. ;)Quote:
Originally posted by SeventhStar
PS. you can remove these '{}' thingies
Commentary: P thinks Hmmm... I know the sum is 24, but that means the numbers could be (2,12), (3,8), or (4,6).Quote:
P. : "I can't find these numbers"
Commentary: S thinks Well of course he can't know it... since the sum is 11, the numbers could be (2,9), (3,8), (4,7), or (5,6). For each possibility, the product could be made from more than one possibility. For example, if it's (2,9), Mr. P would know the product is 18, meaning the numbers could be (2,9) or (3,6).Quote:
S. : "I knew it"
Commentary: P thinks If the numbers were (2,12) then S couldn't have known that, because the sum is 14 so the numbers could have been (3,11), and their product can only be factored one way. If the numbers were (4,6) then S again couldn't have known that, because the sum is 10 so the numbers could have been (3,7), and their product can only be factored one way. If the numbers were (3,8), then their sum is 11, giving S the possibilities (2,9), (3,8), (4,7), or (5,6), whose products can all be factored more than one way. Therefore, the numbers must be (3,8).Quote:
P. : "Then I have know what they are !"
Commentary: S thinks If it were (2,9), whose product is 18, Mr. P could have thought the numbers were (3,6), which would also have fit his statements; since there are two possibilities, how can he know which one? So it can't be (2,9). The same logic holds for (4,7) and (5,6), leaving (3,8) as the only working possibility. Therefore, the numbers must be (3,8).Quote:
S. : "Really ?! Then I have know as well !"
In conclusion, 3 and 8.
but why not 2 and 9
i thought of the same thing and 2 and 9 look the same to me
okay okay I get it... I forgot the last statement smy mistake
again and again I see that I'm as stupid as it gets...
My I'm a stupid **** :mad: :mad: :mad:
Nice idea. But are you sure that no other pair of numbers would fit to the same argumentation?Quote:
Originally posted by solarflare
In conclusion, 3 and 8.