L
L
ligster2014-04-11 10:17:36
Programming
ligster, 2014-04-11 10:17:36

Solve the problem: Find a subset whose total sum is 100,000,000

array[] = {18897109, 12828837, 9461105, 6371773, 5965343, 5946800, 5582170, 5564635, 5268860, 4552402, 4335391, 4296250, 4224851, 4192887, 3439809, 3279833, 3095313, 2812896, 2783243, 2710489, 2543482, 2356285, 2226009, 2149127, 2142508,  2134411}

1. Need a solution using recursion.
2. Implement a check that excludes repeated summations
3. Stop execution if the sum becomes 100,000,000

Answer the question

In order to leave comments, you need to log in

6 answer(s)
J
jcmvbkbc, 2014-04-11
@jcmvbkbc

4. Do it yourself

D
Dmitry Guketlev, 2014-04-11
@Yavanosta

5. This is not a homework site

1
1001001 111, 2014-04-11
@IgorO2

6. Do it using all available programming languages

R
Rsa97, 2014-04-11
@Rsa97

7. Write your own programming language and solve the problem in it.

R
Rsa97, 2014-04-11
@Rsa97

{2134411, 2142508, 2226009, 2543482, 2812896, 3095313, 3279833, 4224851, 4296250,  
 4335391, 4552402, 5268860, 5582170, 5946800, 6371773, 9461105, 12828837, 18897109}

1
1001001 111, 2014-04-11
@IgorO2

8. Make a lot of money on this task

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question