死循环,看不出来问题和TLE
查看原帖
死循环,看不出来问题和TLE
1443865
hepeixi楼主2025/6/29 15:13
#include<bits/stdc++.h>
using namespace std;
int main(){
	int l,r,tot=0;
	cin>>l>>r;
	for(int i=l;i<=r;i++){
    	for(int j=0;j<=14;j++){
    		for(int k=j;k<=14;r++){
    			if(pow(2,j)+pow(2,k)==i){
    				tot++;
				}
			}
		}
	}
	cout<<tot;
}

必壶关

2025/6/29 15:13
加载中...