# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
425468 | errorgorn | Palindromic FizzBuzz (NOI19_palindrome) | C++17 | 24 ms | 1812 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <cstdio>
#include <vector>
using namespace std;
long long n,m;
vector<int> v;
bool p(long long i){
v.clear();
while (i!=0){
v.push_back(i%10);
i/=10;
}
for (int x=0;x<(v.size()+1)>>1;x++){
if (v[x]!=v[v.size()-1-x]) return false;
}
return true;
}
int main(){
scanf("%lld%lld",&n,&m);
for (long long x=n;x<=m;x++){
(p(x)? printf("Palindrome!\n"): printf("%lld\n",x));
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |