nice problem!, consider perhaps adding 'AAA' (with solutions {'+-','-+'}) to the testsuite to make it more challenging
Thanks for the suggestion Alfonso. That does make things a little more challenging. :)
Did you have fun this this last test case, isn't it?? XDDD
YOU... BAD GUYS!! ;-)
J,Q, and K all have value 10. This rule should be probably added to the problem description.
soft
trash
Probably I don't understand what problem ask, but...I think test suite is wrong. For example: test suite 2.
cards = 'A23QJK';
mathSymbols = {'+-/++'};
1+2=3-3=0/9=0+8=8+10=18 that is not 21!
I found {'+-+-+','+/*--','-+-++','-*/++'}=21.
I've problem even in test 5
'A' can take the value 1 or 11 (e.g. 'AAA' with symbols '+-' means 11+11-1==21). 'JQK' all count as 10 (e.g. 'A23QJK' with symbols '+-/++' means ((11+2)-3)/10+10+10==21)
Find the sum of all the numbers of the input vector
32668 Solvers
5869 Solvers
Which values occur exactly three times?
3838 Solvers
Find nearest prime number less than input number
274 Solvers
276 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!