蒟蒻作法
#include<bits/stdc++.h>
using namespace std;
void number (int a, int b, int &sum){
if (a <= b){
if (a*2 <= b) sum++;
if (a*2 + 1 <= b) sum++;
number (a*2, b, sum);
number (a*2 + 1, b, sum);
}
}
int main(){
int a,b;
while (cin >> a >> b){
int sum = 1;
number (a, b, sum);
&...
登录后发布评论
暂无评论,来抢沙发