Method to use all the numbers in a string to equal other number

  • Thread starter ginyu
  • Start date
  • #1
1
0
I was recently given the challenge to take a string of numbers (ages) and + x - / to equal another number (age). As part of the challenge each number can only be used once and you must only use numbers here to do multiply, add to, subtract from or divide by.

NUMBERS
7 9 11 37 45 45 47 75
TARGET NUMBER
70

Im not looking as much for the answer, more if there is any efficent method to do this rather than guess and check
 

Answers and Replies

  • #2
Office_Shredder
Staff Emeritus
Science Advisor
Gold Member
3,894
170
Do you have to use each number once, or can I omit some of them from the solution?
 

Related Threads on Method to use all the numbers in a string to equal other number

Replies
10
Views
18K
  • Last Post
Replies
3
Views
2K
Replies
14
Views
10K
Replies
10
Views
2K
Replies
1
Views
1K
Replies
4
Views
1K
Replies
3
Views
1K
Replies
3
Views
2K
  • Last Post
Replies
5
Views
1K
Top