https://www.acmicpc.net/problem/1065
#include<stdio.h>
int main() {
int x;
scanf("%d",&x);
int count=99;
if(x<100) printf("%d",x);
else{
for(int i=100;i<=x;i++){
int a=i%10;
int b=(i/10)%10;
int c=(i/10)/10;
if(c-b==b-a) count++;
}
printf("%d",count);
}
}