A hard Question ?
Posted
by the-ifl
on Stack Overflow
See other posts from Stack Overflow
or by the-ifl
Published on 2010-05-31T19:24:05Z
Indexed on
2010/05/31
19:43 UTC
Read the original article
Hit count: 216
Hi Guys , I try To find a solution to a question .... we have a number , example : 20 ... and we have 6 number :{ a ,b , c , d , e , f} < 20 , t try to find all values of these numbers , but only if we can combinate (whit + or -) whit 2 of this numbers and getting all the value below to 20 : for example
we choose 31 :
a = 22 b = 21 c = 14 d = 11 e = 9 f = 5
we have : 22 - 21 = 1 ; 11 - 9 = 2 ; 14 - 11 = 3 ; 9 - 5 = 4 ; f = 5 ; 11 - 5 = 6 ; 21 - 14 = 7 ; .... .... .... .... .... 21 + 9 = 30 ; 9 + 22 = 31 ;
© Stack Overflow or respective owner