编写代码，检查给定的数字是否为 Armstrong 数
"""
一个检查给定数字是否为 Armstrong 数的函数
"""

def is_armstrong_number(n): 
    temp = n 
    sum_of_cubes = 0
    while temp > 0: 
        remainder = temp % 10
        sum_of_cubes += remainder * remainder * remainder 
        temp //= 10
  
    return sum_of_cubes == n 
    
if __name__ == "__main__": 
    number = int(input("请输入一个数字："))
    if is_armstrong_number(number): 
        print("它是 Armstrong 数") 
    else: 
        print("它不是 Armstrong 数")