6 条题解

  • 1
    @ 2025-11-6 21:41:22

    包AC

    #include<bits/stdc++.h>
    using namespace std;
    int a,b,ans,cnt;
    int main(){
    	cin >> a >> b;
    	ans=a&b;
    	for(int i=1; i<=6; i++){
    		if(ans&1)cnt++,cout << i << " ";
    		ans>>=1;
    	}
    	if(cnt==0) cout << "0\nNO";
    	else if(cnt==1) cout << "\nNO";
    	else cout << "\nYes";
    	return 0;
    }
    

    信息

    ID
    2554
    时间
    1000ms
    内存
    256MiB
    难度
    7
    标签
    递交数
    923
    已通过
    206
    上传者