Submission #647500

#TimeUsernameProblemLanguageResultExecution timeMemory
647500LeonaRagingPalindromic FizzBuzz (NOI19_palindrome)C++14
100 / 100
13 ms1876 KiB
#include <bits/stdc++.h> using namespace std; #define int long long #define fi first #define se second #define ll long long #define pb push_back #define db(val) "[" #val " = " << (val) << "] " const ll mod = 1e9 + 7; const int maxn = 1e5 + 4; const int INF = 1e9; int s, e; bool isPalin(int x) { int base = x, rev = 0; while (x > 0) { rev = rev * 10 + x % 10; x /= 10; } return (base == rev); } signed main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); //freopen(".INP", "r", stdin); //freopen(".OUT", "w", stdout); cin >> s >> e; for (int i = s; i <= e; i++) { if (isPalin(i)) cout << "Palindrome!"; else cout << i; cout << '\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...