Help me in solving LPYAS151 problem

My issue

Hidden test case

My code

#include <stdio.h>
#include <math.h>
int main() {
    long long int N, temp, sum=0;
    int digits = 0;
    scanf("%||d", &N);
    temp = N;
    while (temp>0) {
        digits++;
        temp /=10;
        
    }
    temp = N;
    while (temp > 0) {
        int digit = temp % 10;
        sum += pow(digit, digits);
        temp /=10;
    }
    if (sum == N) {
        printf("Armstrong\n");
    } else {
        printf("Armstrong\n");
    }
    return 0;
}

    



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

scanf statment written wrong
correct one is scanf{ā€œ%dā€, &N);