4130: 【10NOIP普及组】数字统计

Memory Limit:64 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

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

Input

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

Output

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

Sample Input Copy

2 22

Sample Output Copy

6

Source/Category