Store sign of a and b
if a > 0 : NEW_LINE INDENT sign_a = 1 NEW_LINE DEDENT else : NEW_LINE INDENT sign_a = - 1 NEW_LINE DEDENT if b > 0 : NEW_LINE INDENT sign_b = 1 NEW_LINE DEDENT else : NEW_LINE INDENT sign_b = - 1 NEW_LINE DEDENT shift_solution ( a , b , - x // b ) NEW_LINE