[Community Puzzle] All Operations are Equal!

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @tzaph,validated by @Bmol and @UnicornP.
If you have any issues, feel free to ping them.

A = 0
B = 2
C = 1
D = 1
E = 1
A + E = B - E = C * E = 1
… x = 4

Not sure what you’re trying to say? But the puzzle mentions that A, B, C, D and E must be positive, so A can’t be 0.

Any clues for validator 1 and validator 2?
I’m pretty sure I did everything correct since it’s passed all build-in tests.
But when I submit it’s failed on Validator 1 and 2.

The input numbers in Validator 1 are just random numbers.

The input numbers in Validator 2 are either very small numbers or very large numbers (the upper end of the constrained range of X). So you may try to debug by first checking whether your code produces correct answers for very small X.

1 Like

Thank you!
It seems it does. It passes the built-in test 2 which includes both small and large numbers. But still fails submitting validators.
1
2
3
4
5
99996
99997
99998
99999
100000
NO
NO
NO
NO
NO
YES
YES
NO
YES
YES

Solved. Thanks for the clue!
I’ve added x < 8 condition to prevent useless calculations and it was hiding my algorithm defect.