flat assembler
Message board for the users of flat assembler.
Index
> Heap > Math Question 
Author 

victor
Already worked out the max value, which is (2008 + 4030057) = 4032065.
To find the min value, we may try all integers starting from 4014 and go backward (4013, 4012, 4011, ...), up to 2008. Any smarter methods? 

25 Mar 2008, 03:43 

TmX
This is my idea
Let's assume (ab1)/(a+b) = 2007/1, so ab1 = 2007 and a+b = 1 ab  1 = 2007 > ab = 2008 ... (1) a + b = 1 > a = 1b ... (2) Substituting (2) to (1) gives : (1b)b = 2008 b  b^2 = 2008 b^2  b + 2008 = 0 Well, the solution is irrational numbers, so (a+b) must be > 1 

25 Mar 2008, 03:50 

AlexP
Brute force!!!


25 Mar 2008, 04:45 

r22
(((2007*y+1)/(y2007)) * y  1) / (((2007*y+1)/(y2007)) + y) = 2007
... ... ... funny Victor 

25 Mar 2008, 19:55 

< Last Thread  Next Thread > 
Forum Rules:

Copyright © 19992020, Tomasz Grysztar.
Powered by rwasa.