# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1118343 | Aviansh | Palindromic FizzBuzz (NOI19_palindrome) | C++17 | 1052 ms | 139348 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(int 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... |