# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1133838 | isthisnametaken | Palindromic FizzBuzz (NOI19_palindrome) | C++20 | 10 ms | 1864 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
signed main()
{
ll E, S;
bool check = true;
cin >> E >> S;
for (ll i = E; i <= S; i++)
{
string s = to_string(i);
ll size = s.size();
for (ll k = 0; k < size / 2; k++)
{
if (s[k] != s[size - k - 1])
{
check = false;
break;
}
}
if (check == true)
{
cout << "Palindrome!" << "\n";
}
else
{
check = true;
cout << i << "\n";
# | 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... |