제출 #974883

#제출 시각아이디문제언어결과실행 시간메모리
974883sleepntsheepPalindromes (info1cup18_palindromes)C11
100 / 100
129 ms10236 KiB
#include<stdio.h>

int n,d;long long z;

int ispal(int a)
{
    int b=a,c=0;
    while(b)c=c*10+b%10,b/=10;
    return c==a;
}
int main()
{
    scanf("%d",&n);
    while(n--)
        scanf("%d",&d), z+=ispal(d)*d;
    printf("%lld",z);
}

컴파일 시 표준 에러 (stderr) 메시지

palindromes.c: In function 'main':
palindromes.c:13:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   13 |     scanf("%d",&n);
      |     ^~~~~~~~~~~~~~
palindromes.c:15:9: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   15 |         scanf("%d",&d), z+=ispal(d)*d;
      |         ^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...