Back to General discussions forum
for the case
11
092434=101
578529=134
475289=261
971840=287
663946=279
366080=205
168382=271
763991=102
364195=191
238615=292
302889=128
i have the answer :
0 (5)*(7)*((8)-5)+29 (4)*((7)*(5)+28)+9 0 6*((6)*(3)*(9)/(4)+6) 0 1+((6)*(8)-3)*((8)-2) (7)*((6)-3)+(9)*(9)*1 (3)*((64)+1)-(9)+5 (2)*(3)*(8)*6-((1)-5) (3)*(0)-2*((8)-(8)*9)
checker refused my answer 2
(5)*(7)*((8)-5)+29 = 134
where is the error please???
Your idea of using brackets to enclose numbers unstead of operations is interesting, but looks like it not works.
I suppose the following expression would be correct: (((5*7)*(8-5))+29)
my answer was : (5)(7)((8)-5)+29 = 134 (all * above are missing , i don't know why) and it's has been refused...
(5)X(7)X((8)-5)+29 has been refused
Good morning, mooninvader.
Asterics are missing in your posts, because each pair of them marks text to be emphasized with italics.
See Help page on Markdown at Code Abbey for more details.
About your expression - let imagine that I am a checker and is trying to interpret your expression:
(8)
. I calculate it and get 8.(5)
equals to 5, (7)
yields to 7 and finally (8-5)
equals to 3.5*7
, result is 35.3+29
(there are no brackets left, so I have no idea about right order), 3+29
equals to 32.Hi Friends!
I'm sorry, but qwerty_one
seems to be correct - reviewing problem statement I see (in the restriction section):
please surround every binary operation by brackets to avoid priority issues
(by coincidence markdown in problem statement also was a bit broken and this requirement was not emphasized - I fixed this)
Sorry for this inconvenience.
As about parentheses around every single value - I looked into checker code and seems these also could be problem, but you can easily get rid of them in your code. Hm-m-m... or I can improve checker to replace such things with regexp if you insist... :)
thank you all, I will find a better approach, besides all those extra parenthesis all ugly. if the solution is not simple enough that's mean this is not the better one.
thak you all guys, i solved it the solution is not that mush elegant : I used the buit in python function eval and was forced to deal with leading zeros since eval don't accept it : but the function itself is only ten lines length
the solution is not that mush elegant
honestly, I don't know solution for this problem. Here are few problems of such kind - people suggested them and I knew how to create data generator and answer checker - and created them - but never had clear idea of how to solve :)