文章
37
粉丝
98
获赞
4
访问
21.8k
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int cnt = 0;
int m, n;
void searchRoute(int x) {
if (x > n) {
return;
}
else {
cnt++;
searchRoute(2 * x);
searchRoute(2 * x + 1);
}
}
int main()
{
while (cin >> m>> n) {
//为a填值
if (m > n) {
cout << 0 << endl;
}
else {
searchRoute(m);
cout << cnt ...
登录后发布评论
暂无评论,来抢沙发