# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
517799 | thegrimbee | Palindromic FizzBuzz (NOI19_palindrome) | C++14 | 22 ms | 1872 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 <bits/stdc++.h>
#define int long long
using namespace std;
bool check(string s){
for (int i = 0; i < s.size() / 2; ++i){
if (s[i] != s[s.size()-1-i])return false;
}
return true;
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
int S, E;
cin >> S >> E;
for (int i = S; i <=E; ++i){
if (check(to_string(i)))cout << "Palindrome!\n";
else cout << i << '\n';
}
}
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... |