Submission #1134984

#TimeUsernameProblemLanguageResultExecution timeMemory
1134984definitelymaybePalindromic FizzBuzz (NOI19_palindrome)C++20
100 / 100
83 ms1864 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long ll getReversedVersion(ll n) { ll cur = 0; while ( n >= 1) { ll temp = n % 10; cur = (cur * 10) + temp; n = n / 10; // 1234 / 10 = 123.4 = 123, double n = 1234; n = n / 10; => n = 123.4 } return cur; } int main() { ll s; ll e; ll cur; cin >> s; cin >> e; for (ll i = s; i <= e; i++) { cur = getReversedVersion(i); if (cur == i) { cout << "Palindrome!" << endl; // << “\n”; } else { cout << i << endl; } } }
#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...