1669: 寻找给定范围的数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:7 Solved:5

Description

请统计某个给定范围[L, R]的所有整数中,数字2出现的次数。 
比如在给定范围[2, 22],数字2在数2中出现了1次,在数12中出现了1次,在数20中出现了1次,在数21中出现了1次,在数22中出现了2次,所以数字2在该范围内一共出现了6次。

Input

输入共一行,为两个正整数L和R,之间用一个空格隔开

Output

输出共1行,表示数字2出现的次数

Sample Input Copy

2 22

Sample Output Copy

6