Why this code is showing as the wrong answer in the question code DIVBYI
#include <bits/stdc++.h>
using namespace std;
#define fast_cin ios_base::sync_with_stdio(false);cin.tie(NULL)
typedef long long ll;
void fun(){
int n; cin>>n;
int j=n,k=1;
for(int i=1;i<=n;i++){
if(i%2!=0) {
cout<<j<<" “;
j–;
}
else{
cout<<k<<” ";
k++;
}
}
}
int main() {
fast_cin;
ll t; cin>>t;
while(t–){
fun();
cout<<"\n";
}
return 0;
}