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 <iostream>
using namespace std;
bool check2(unsigned long long num)
{
while (num / 10 > 0)
{
if (num % 10 == ((num / 10) % 10))
return true;
num /= 10;
}
return false;
}
bool check3(unsigned long long num)
{
while (num / 100 > 0)
{
if (num % 10 == ((num / 100) % 10))
return true;
num /= 10;
}
return false;
}
bool checkParlindrome(unsigned long long num)
{
return check2(num) || check3(num);
}
int main()
{
unsigned long long a, b;
cin >> a >> b;
unsigned long long total = 0;
for (unsigned long long i = a; i <= b; i++)
if (!checkParlindrome(i))
total++;
cout << total << endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |