1wa,2爆,求助
查看原帖
1wa,2爆,求助
970434
heheya楼主2024/9/24 13:58
#include<bits/stdc++.h>
using namespace std;
int qq;
int Count(unsigned long long x)
{
	int icount = 0;
	while (x != 0 )
	{
		icount ++;
		x = x & (x - 1);
	}
	 qq=icount;
	 return 1;
}
int main(){
    int a;
    cin>>a;
    unsigned long long b;
    for(int i=1;i<=a;i++){
        cin>>b;
        Count(b);
        
        if(qq<3){
        
            for(int j=1;j<=a;j++){
            	Count(b+j);
            		
            	if(qq<3){
            		cout<<b+j<<endl;
            		break;
				}
			}
        }
        else  cout<<"No,Commander"<<endl;
    }
}
2024/9/24 13:58
加载中...