编程题:String Builder
You are going to read four numbers: n, a, b and c, like this:
```
12 2 5 3
```
First, *n* is used to build up a string from 0 to n, like this:
```
0123456789101112
```
is a string build up for *n=12*.
Then, in all the digits from index *a* to index *b*, count the appearence of *c*.
For the string above, *2 5* is:
```
2345
```
Thus the appearence of *3* is 1.
### Input Format:
Four positive numbers, *n*, *a*, *b* and *c*, where $$a
### Output Format:
One number represnets the length of the generated string.
One number represents the apprence of *c*.
There is a space between the two numbers.
### Sample Input:
```in
12 2 5 3
```
### Sample Output:
```out
16 1
```
答案:若无答案欢迎评论
```
12 2 5 3
```
First, *n* is used to build up a string from 0 to n, like this:
```
0123456789101112
```
is a string build up for *n=12*.
Then, in all the digits from index *a* to index *b*, count the appearence of *c*.
For the string above, *2 5* is:
```
2345
```
Thus the appearence of *3* is 1.
### Input Format:
Four positive numbers, *n*, *a*, *b* and *c*, where $$a
### Output Format:
One number represnets the length of the generated string.
One number represents the apprence of *c*.
There is a space between the two numbers.
### Sample Input:
```in
12 2 5 3
```
### Sample Output:
```out
16 1
```
答案:若无答案欢迎评论