把数字1到n连接起来就构成了第n个Smarandache consecutive number。Smarandache的前17个数如下:
1
12
123
1234
12345
123456
1234567
12345678
123456789
12345678910
1234567891011
123456789101112
12345678910111213
1234567891011121314
123456789101112131415
12345678910111213141516
1234567891011121314151617
给定一个正整数n,问[1,n]之间含有多少个Smarandache consecutive number?
输入
多行数据组成。
每行一个整数n,n大于1并且小于第1000个Smarandache consecutive number。
输出
对于每一行的数据n,输出一行,即[1,n]之间Smarandache consecutive number的个数。
有点晕