幂和数代码
#include <bits/stdc++.h> using namespace std; int main(){ int l,r,n,m =0; cin>>l>>r; for(int i=0;pow(2,i)<r;i++){ for(int j=i;pow(2,j)<r;j++){ if((n=pow(2,i)+pow(2,j))<=r&&(n=pow(2,i)+pow(2,j))>=l){ m+=1; } } } cout<<m; return 0; }