如果你WA#3
查看原帖
如果你WA#3
1419725
封禁用户楼主2025/8/4 15:41
#include<bits/stdc++.h>
using namespace std;
int x;
int main()
{
	cin >> x;
	cout << (x % 2 == 0 &&( x > 4 && x <= 12)) << " ";
	cout << (x % 2 == 0 || ( x > 4 && x <= 12)) << " ";
	cout << (x % 2 == 0 != ( x > 4 && x <= 12))<< " ";
	cout << !(x % 2 == 0 &&( x > 4 && x <= 12)) << " ";
	return 0; 
}

注意第四个if要分别判断

2025/8/4 15:41
加载中...