📜  自恋数字 - 任何代码示例

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

代码示例1
def narcissistic( value ):
    value = str(value)
    size = len(value)
    sum = 0
    for i in value:
        sum += int(i) ** size
    return sum == int(value)