ENG  RUSTimus Online Judge
Online Judge
Online contests
About Online Judge
Frequently asked questions
Site news
Problem set
Submit solution
Judge status
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
back to board

Discussion of Problem 1365. Testing Calculator

Strange behavior
Posted by bsu.mmf.team 22 Apr 2019 18:12
Sample module returns:
Expression 1 evaluates to: 111
Expression 2 evaluates to: 1
Expression 3 evaluates to: 11

My AC program returns different result for 3rd string: 111

It's very weird that more complex expression returns smaller result, it fully contradicts the problem statement "It may be assumed that logic of expression evaluation does not depend on context. It means, that each subexpression is always evaluated in the same way with no dependency on it's entrance into the whole expression."

Well, I guess my test can be incorrect though, but it doesn't follow from the problem description. Maybe, it should be updated a little to specify what kind of expressions is acceptable?