#include <stdio.h>
int main()
{
int n;
scanf("%d", &n);
int i;
int count = 0;
for(i = 0;i <= n; i++)
{
int tmp = i;
while(tmp)
{
if(tmp % 10 == 9)
{
count++;
}
tmp = tmp / 10;
}
}
printf("%d\n", count);
return 0;
}
0到99种有多少个9
最新推荐文章于 2020-12-01 21:16:24 发布