Numbers ending with zeros are boring. They might be fun in your world, but not here. Get rid of them. Only the ending ones. 1450 -> 145 960000 -> 96 1050 -> 105 -1050 -> -105Zero alone is fine, don't worry about it. Poor guy anyway Solution: def remove_zero(func): def wrapper(n: int): s = str(n).rstrip("0") return func(s) return wrapper @remove_zero def no_boring_zeros(s: str): return s and ..