# Cloudin 云英 面试题 deftransformer(x, y): if x == y: returnTrue elif x > y: returnFalse elif x % 2 == 0: return transformer(x + 1, y) or transformer(2 * x, y) elif x % 2 == 1: return transformer(2 * x, y)
if __name__ == "__main__": x = 3 y = 24 assert transformer(x, y) x = 3 y = 6 assert transformer(x, y) x = 3 y = 7 assert transformer(x, y) x = 3 y = 12 assert transformer(x, y) x = 3 y = 13 assert transformer(x, y) x = 3 y = 8 assertnot transformer(x, y) x = 3 y = 9 assertnot transformer(x, y)