def is_sum_of_powers_of_their_digits(digit: int, power: int):
    """
    Verify is the number can be written as the sum of
    'power' powers of their digits

    :param digit:
    :param power:
    :return:
    """
    return digit == eval(' + '.join(str((int(d) ** power))
                                    for d in str(digit)))