超时了...
查看原帖
超时了...
1228503
dirty_1one楼主2025/6/29 13:17
#include<bits/stdc++.h>
using namespace std;
int l,r,sum;
int main(){
    cin>>l>>r;
    for(int i=l;i<=r;i++){
        for(int j=0;j*j<=r;j++){
            for(int k=0;k*k<=j*j;k++){
                if(i==pow(2,j)+pow(2,k)){
                    sum++;
                }
            }
        }
    }
    cout<<sum;
    return 0;
}
2025/6/29 13:17
加载中...