Hi,
can anyone help with advice on the input? it's seem like it is very very tricky. So far my program has been able to handle the below input,
Input
8 = (2 0 10 0)
12 = (10 0 2 0)
10 = 10 20
10 = (5 0 0 5)
9 = ( ( ( 18) ) ) ( ( ( 9 ) ) )((1))
0 = 0
100 = 10 10
45 =((1)) 2( ( 3 4)( 5 6) 7 )8 9
9 = ( ( ( 18) ) )( ( ( 9 ) ) )
45 =((1)) 2 ( ( 3 4) ( 5 6) 7 ) 8 9
200 = 20 10
18 = (7 5) 3 2
18 =
9 = ( ( ( 18) ) ) ( ( ( 9 ) ) )
42 = 7 ( ( (5) (2 4 ) ) 3) 2
18 = 7 (5 3) 2
30 = 3 3 5
18 = 3 3 5
5 = 3 3
0
Output
Equation #1:
12=(10+0+2+0)
Equation #2:
10=-10+20
Equation #3:
10=(5+0+0+5)
Equation #4:
9=(((18)))-(((9)))*((1))
Equation #5:
0=0
Equation #6:
100=10*10
Equation #7:
45=((1))+2+((3+4)+(5+6)+7)+8+9
Equation #8:
9=(((18)))-(((9)))
Equation #9:
45=((1))+2+((3+4)+(5+6)+7)+8+9
Equation #10:
200=20*10
Equation #11:
18=(7+5)-3*2
Equation #12:
Impossible.
Equation #13:
9=(((18)))-(((9)))
Equation #14:
42=7+(((5)+(2+4))+3)*2
Equation #15:
18=7+(5-3)*2
Equation #16:
30=3+3*5
Equation #17:
Impossible.
Equation #18:
Impossible.
Any help will be greatly appreciated!
