SRM 568 Div2 Easy TheSimilarNumbers

similarの定義は2つの数a, bについて(a

class TheSimilarNumbers
{
public:
  int find(int lower, int upper)
    {
      int res = 0;
      int i;
      for(i = lower; i <= upper; i = i*10+1){
        res++;
      }
      return res;
    }
};