Submission #974883

#TimeUsernameProblemLanguageResultExecution timeMemory
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); }

Compilation message (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...