제출 #1134614

#제출 시각아이디문제언어결과실행 시간메모리
1134614TheInvadrPalindromic FizzBuzz (NOI19_palindrome)C++20
100 / 100
16 ms1864 KiB
#include <bits/stdc++.h> using namespace std; long long S, E; bool is_palindrome(long long x) { vector<int> v; while (x > 0) { v.push_back(x%10); x /= 10; } for (int i = 0; i < v.size(); i++) if (v[i] != v[v.size() - i - 1]) return false; return true; } int main() { scanf("%lld%lld", &S, &E); for (long long i = S; i <= E; i++) { if (is_palindrome(i)) printf("Palindrome!\n"); else printf("%lld\n", i); } }

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

palindrome.cpp: In function 'int main()':
palindrome.cpp:17:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   17 |         scanf("%lld%lld", &S, &E);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~
#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...