Submission #872755

#TimeUsernameProblemLanguageResultExecution timeMemory
872755rainboyPalindromic FizzBuzz (NOI19_palindrome)C11
100 / 100
10 ms1884 KiB
#include <stdio.h> long long rev(long long a) { long long b = 0; while (a > 0) b = b * 10 + a % 10, a /= 10; return b; } int main() { long long l, r, a; scanf("%lld%lld", &l, &r); for (a = l; a <= r; a++) if (a == rev(a)) printf("Palindrome!\n"); else printf("%lld\n", a); return 0; }

Compilation message (stderr)

palindrome.c: In function 'main':
palindrome.c:14:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   14 |  scanf("%lld%lld", &l, &r);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...