Untitled
#include <iostream> using namespace std; int main() { int a, b, c, d; cin >> a >> b; int count = 0; for (int i = a; i <= b; ++i) { c = i / 10; c /= 10; d = i % 10; if (c == d) { count++; } } cout << count; }
#include <iostream> using namespace std; int main() { int a, b, c, d; cin >> a >> b; int count = 0; for (int i = a; i <= b; ++i) { c = i / 10; c /= 10; d = i % 10; if (c == d) { count++; } } cout << count; }