4191: 范范找数字“2”

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:8 Solved:6

Description

题目描述
请统计某个给定范围[L,R]的所有整数中,数字2出现的次数。L、R在[2,99999]区间内。
例如,给定范围[2,22],数字2在数2中出现了1次,在数12中出现1次,在数20中出现1次,在数21中出现1次,在数22中
出现2次,所以数字2在该范围内一共出现了6次。
输入
输入共1行,为两个正整数L和R,之间用一个空格隔开。
输出
输出共1行,表示数字2出现的次数。

Input

2 22

Output

6

Sample Input Copy

2 22

Sample Output Copy

6