Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
302 B
1
Indexable
Never
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
	int a, b, c = 0, d, f;
	cin >> a >> b;
	for (int i = a; i < b+1; i++)
	{
		d = i;
		f = i;
		while (d > 10)
		{
			d /= 10;
		}
		while (f > 100)
		{
			f /= 10;
		}
		if (d == f%10) c += 1;
	}
	cout << c;
}