[Community Puzzle] Equivalent Resistance, Circuit Building

https://www.codingame.com/training/easy/equivalent-resistance-circuit-building

Send your feedback or ask for help here!

Created by @Schwase,validated by @luke-guyton,@Djoums and @stephan2342.
If you have any issues, feel free to ping them.

FWIW, I wouldn’t consider this an easy problem (and I just finished my first ‘very difficult’ problem). Perhaps I’m just not good at parsing, but this has a tedious number of special cases to handle

It’s an easy problem.
The parsing is not hard (just check matching brackets) and I did not find special cases.

It’s not that hard if you’re familiar with stacks.

You can use an explicit stack or do it recursively to let the execution stack do the work for you.

I passed all the tests in IDE but got 83% when I submitted my solution. I cannot think of any reason why my solution would fail on 5 pointed star validator. Any hints?

I don’t know.
Maybe your rounding method is false?

whenever you see a balanced expression you must use a stack.
include the parenthesis in the stack…
and believe me, you will spend less time figuring it by yourself than trying to find a solution on github