change logic and accepted by the judge
thoughts
sol of q091