📜  armstrong 数字函数 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:30.747000             🧑  作者: Mango

代码示例1
def is_armstrong_number(number: int)-> bool:
    arm = str(number)
    lenght = len(arm)
    sum = 0
    for digit in arm:
        sum += int(digit)**lenght
    return sum == number