A ^&^
要用long long 输入
题目中这个If the value of the expression is 0 when C=0, please print 1.的意思是如果a&b==0了的时候输出1
其他的都是输出(a&b)
0 1 0 1
0 1 1 0
只用管两者都是1的时候让c的那一位为1
#include<stdio.h> typedef long long ll; int main() { int t; scanf("%d",&t); while(t--) { ll a,b; scanf("%lld%lld",&a,&b); if((a&b)==0) printf("1\n"); else printf("%lld\n",(a&b)); } }