Help me in solving LPYAS151 problem

failed hidden test case
}

My code

#include <stdio.h>
int main() {
    int num,x,r,result=0;

    scanf("%d",&num);
    x=num;
        while (x!=0){
        r=x%10;
       result=result+r*r*r;
       x=x/10;
    }
    if (result==num)
        printf("Armstrong");
    else
        printf("Not Armstrong");

    return 0;
}
    

Learning course: Roadmap to 3*
Problem Link: https://www.codechef.com/learn/course/klu-roadmap-3star/KLURMP300B/problems/LPYAS151