This is a discussion on Math within the Entertainment board part of the General category; Is the answer 4 and 13? edit: dang you ichsuger, i just read your post and you have the same ...
Is the answer 4 and 13?
edit: dang you ichsuger, i just read your post and you have the same answer
edit edit: after a little google search (to see if my answer was right) i found this hard math riddle: two numbers between 1 and 99 - TestMagic Forums
on page 2 i found something that surprised me...
^^^^^^^^^^^^^^
ichsuger is a cheater!!!
edit edit edit:I just failed so bad it hurtswha ? oh ! , forgot im so bad at math it hurts, but im good at finding stuff on the internet !
Last edited by Pan; 11-28-2008 at 07:56 PM.
I'M BAAACKKK
Me = Failz
I'M BAAACKKK
i found this.. someone did some work 0.0 same page as pan found it
Code:Sub main() For b = 2 To 98 For a = 2 To 98 If a + b < 100 Then ' Debug.Print a; b, If Not P_knows(a * b) Then ' Debug.Print "P knows not", If S_knows_that(a + b) Then ' Debug.Print "S knows that", If P_knows_now(a * b) Then ' Debug.Print "P knows now", If S_knows_now(a + b) Then ' Debug.Print "S knows now", MsgBox Format(a) + ", " + Format(b) End If: End If: End If: End If: End If ' Debug.Print ' DoEvents Next a, b End Sub Function P_knows(Product As Integer) 'Does P know the numbers? t = 0 For I = 2 To Sqr(Product) 'Sqr to exclude the same numbers (e.g. 8 = 2 * 4 and 4 * 2) If Product Mod I = 0 Then t = t + 1 'P doesn't know if you can divide it by more then one number If t > 1 Then Exit For 'no need to check futher Next P_knows = t = 1 End Function Function S_knows_that(Sum) 'Does S know that P can't know the numbers? For I = 2 To Sum 2 ' 2 to exclude the same numbers (e.g. 17 = 2 + 15 and 15 + 2) If P_knows(i * (Sum - i)) Then 'for all the possible sums P should not be able to know the combination S_knows_that = False Exit Function End If Next i S_knows_that = True End Function Function P_knows_now(Product) 'Does P know the two numbers after S knows that P can't know them? t = 0 For I = 2 To Sqr(Product) If Product Mod I = 0 Then 'P can only say that if there is just one combination If I + (Product i) < 100 Then If S_knows_that(i + (Product i)) Then t = t + 1 If t > 1 Then Exit For 'no need to check futher End If Next i P_knows_now = t = 1 End Function Function S_knows_now(Sum) 'Does S know the two numbers too after P knows them? t = 0 For I = 2 To Sum 2 'S can only say that if there is just one combination If P_knows_now(i * (Sum - i)) Then t = t + 1 If t > 1 Then Exit For 'no need to check futher Next i S_knows_now = t = 1 End Function
Cheatz0rs=(