Help me in solving LPYAS151 problem

My issue

why is it not correct

My code

#include <stdio.h>

int main() {
    int m,n,sum=0,d;
    scanf("%d",&n);
    m=n;
    while(n!=0){
        d=n%10;
        n=n/10;
        sum=sum+(d*d*d);
    }
    if(m==sum){
    printf("Armstrong");
    }else{
    printf("Not Armstrong");
    }
    return 0;
}


Learning course: Algorithmic Problem Solving
Problem Link: https://www.codechef.com/learn/course/klu-problem-solving/KLUPS00A/problems/LPYAS151