Reply
Thu 23 Jun, 2005 09:51 pm
it's really difficult:
teacher know two natural numbers,m,n.2≤m≤n≤100。he tells the sum of m and n to S,and the product to P.S and P are all honest students.
S said:i don't know what they are ,i know you don't know either
P said:now i know
S said:now i know ,too
dear clever friends,can you know what m and n are?
mark, i only looked at the problem as posted at your link, not the solution, but i noticed right away that there's an extra condition given there which is omitted in this thread, which is, before S says he doesn't know the numbers but did know that P wouldn't know either, P first says he doesn't know the two numbers. is this extra statement necessary to solve this riddle?
This is quite a hard one, requiring alot of maths and logic knowledge, rather that IQ.
The only numbers that work and allow the statements made above to be true are 4 and 13
you are really clever if you have not looked at the key
Sweet, I made it in at 15.
i scored 141 on the "more realistic" verbal test. i'm not commenting on how realistic that score is. IMO, the test would be more accurate if it included a choice for i don't know for each question; otherwise, it would have to subtract points for wrong answers the way the SAT does, or else overestimate IQ unless it's been normed to take guessing into account. in short, without knowing how the test is scored, it's hard to say if it's realistic.
The exceptional IQ test segment is the only IQ test that I found really challenging, meaning I couldn't do it with a casual glance nor a few minutes simple contemplation.
Code:package com.aepryus.primes;
public class Primes {
private static boolean doesPKnow (int n) {
int factors = 0;
for (int i=2;i*i<=n;i++)
if (n/i<=100 && n%i==0)
factors++;
return factors == 1;
}
private static boolean doesSKnowPDoesntKnow (int n) {
for (int i=2;i+i<=n;i++)
if (n-i<=100 && doesPKnow(i*(n-i)))
return false;
return true;
}
private static boolean doesPDiscover (int n) {
int knowns=0;
for (int i=2;i*i<=n;i++)
if (n/i<=100 && n%i==0 && doesSKnowPDoesntKnow(i+(n/i)))
knowns++;
return knowns == 1;
}
private static boolean doesSDiscover (int n) {
int knowns=0;
for (int i=2;i+i<=n;i++)
if (n-i<=100 && doesPDiscover(i*(n-i)))
knowns++;
return knowns == 1;
}
public static void main (String[] args) {
int s=0;
for (int i=2;i<=100;i++)
for (int j=i;j<=100;j++) {
if (doesSKnowPDoesntKnow(i+j) && doesPDiscover(i*j) && doesSDiscover(i+j)) {
System.out.println("("+i+","+j+")");
s++;
}
}
System.out.println("Solutions ["+s+"]");
}
}
Output:
Code:(4,13)
Solutions [1]