+ 20

CHALLENGE: Find all the possibilities for using the numbers in a given order to get 100 1⃣▪️▪️▪️9⃣ ➡ ️ 1⃣0⃣0⃣

Level: medium Task1: Find all possibilities to put + or - or nothing between the numbers 1,2,…,9 (in this order) such that the result is 100. For example: 1 + 2 + 3 - 4 + 5 + 6 + 78 + 9 = 100 Task2: Find all possibilities to put + or - or nothing between the numbers 9,8,…,1 (in this order) such that the result is 100. For example: 9 + 8 + 76 + 5 + 4 - 3 + 2 - 1 = 100 All languages are welcome! https://code.sololearn.com/ccXCd5YjTxzG/?ref=app

10th Nov 2017, 11:38 AM
LukArToDo
LukArToDo - avatar
4 Respuestas
10th Nov 2017, 11:41 PM
Hiroki Masuda
Hiroki Masuda - avatar
+ 6
lazy
10th Nov 2017, 3:29 PM
Asiri H
Asiri H - avatar
+ 3
Sorry it took so long. I was in the midst of too many things and forgot I wanted to do this. https://code.sololearn.com/cBm5LSxMbfmu/?ref=app
7th Dec 2017, 6:24 AM
John Wells
John Wells - avatar
+ 1
Got 11 forward answers and 15 reverse answers using recursion and backtracking. https://code.sololearn.com/c0ZPo3u6l6VP/#java
11th Nov 2017, 4:39 AM
Bill Fisher