「BZOJ1026」[SCOI2009] windy数

2014年6月18日6,9463

Description

windy定义了一种windy数。不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道,在A和B之间,包括A和B,总共有多少个windy数?

Input

包含两个整数,A B。

Output

一个整数。

Sample Input

「输入样例一」
1 10
「输入样例二」
25 50

Sample Output

「输出样例一」
9
「输出样例二」
20
「数据规模和约定」
20%的数据,满足 1 <= A <= B <= 1000000 。
100%的数据,满足 1 <= A <= B <= 2000000000 。

题解

 

avatar
3 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
ハク黄学长小号2333 Recent comment authors
  Subscribe  
提醒
姬树流

这个代码怎么连样例都没有过啊

ハク

小数据貌似会比正解大1?

黄学长小号2333
黄学长小号2333

貌似1 9这个程序就过不了?