# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1118344 | Aviansh | Palindromic FizzBuzz (NOI19_palindrome) | C++17 | 13 ms | 1996 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>
using namespace std;
bool pal(long long n){
string s = to_string(n);
for(int i = 0;i<s.size()/2;i++){
if(s[i]!=s[s.size()-i-1]){
return 0;
}
}
return 1;
}
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
long long s,e;
cin >> s >> e;
for(long long i = s;i<=e;i++){
if(pal(i)){
cout << "Palindrome!\n";
}
else{
cout << i << "\n";
}
}
return 0;
}
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... |