84分求助(互关)
查看原帖
84分求助(互关)
1425993
Lty2013楼主2024/9/28 17:22
#include<bits/stdc++.h>
using namespace std;
int main(){
	unsigned long long n;
	cin>>n;
	long long x;
	if(n%2==0){
		int t=ceil(n/2);
		if(t%2==0){
			cout<<(0^n);
		}
		else{
			cout<<(1^n);
		}
	}
	else{
		int t=ceil(n/2)+1;
		if(t%2==0){
			cout<<0;
		}
		else{
			cout<<1;
		}
	}
	return 0;
}
2024/9/28 17:22
加载中...