一、定义

给定的范围[l,r]中,满足(不满足)某个条件的数字,有多少个。

二、思路

从高位开始想低位,按位遍历,递归向下,求第i位的时候,需要第i-1位的所有可能性的和。

三、例题

http://acm.hdu.edu.cn/showproblem.php?pid=3555

http://acm.hdu.edu.cn/showproblem.php?pid=2089(题解:https://blog.csdn.net/weixin_43272781/article/details/86669457

https://www.lydsy.com/JudgeOnline/problem.php?id=1026(题解:https://blog.csdn.net/weixin_43272781/article/details/86679206

http://acm.hdu.edu.cn/showproblem.php?pid=5435

http://acm.hdu.edu.cn/showproblem.php?pid=4734

https://www.lydsy.com/JudgeOnline/problem.php?id=1833(题解:https://blog.csdn.net/weixin_43272781/article/details/86681413

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3962(题解:https://blog.csdn.net/weixin_43272781/article/details/86682703

四、参考文章

https://www.cnblogs.com/zbtrs/p/6106783.html

https://www.cnblogs.com/perfy576/p/8746637.html