#P3372. Undoubtedly Lucky Numbers

Undoubtedly Lucky Numbers

题目描述

若一个正整数的十进制表示(最高位不为 00)只包含数字 xxyy,则我们称它为幸运数。例如,如果 x=4x=4y=7y=7,那么 474774474444 等数是幸运的。请你计算 nn 以内有多少个幸运数。

输入格式

一个整数 nn1n1091\le n\le 10^9

输出格式

nn 以内幸运数的个数(包括 nn)。

10
10
123
113