Help me in solving MANCODE problem

My issue

include <bits/stdc++.h>
using namespace std;

int main() {
// your code goes here
int t;
cin>>t;
while(t–){
int n;
cin>>n;
int max = (n/2)+1;
int min = 0,count = 0;
if (n%2 == 0){
cout<<n%2<<" "<<n%2<<endl;
}else{

        cout<<max<<" "<<max-1<<endl;
    }
    
}

}

My code

#include <bits/stdc++.h>
using namespace std;

int main() {
	// your code goes here
	int t;
	cin>>t;
	while(t--){
	    int n;
	    cin>>n;
	    int max = (n/2)+1;
	    int min = 0,count = 0;
	    if (n%2 == 0){
	        cout<<n%2<<" "<<n%2<<endl;
	    }else{
	       
	        cout<<max<<" "<<max-1<<endl;
	    }
	    
	}

}

Problem Link: The Man Code Practice Coding Problem