My issue
What is time limit exceed?
My code
#include <iostream>
using namespace std;
int main()
{
int test,n;
long int num_Hoop;
cin>>test;
n=test;
int result[n] {};
int j=0;
while(test--){
cin>>num_Hoop;
if(num_Hoop == 1){
result[j]=1;
j++;
}
else if (num_Hoop > 2){
int hoop[num_Hoop] {};
for(int i=0; i<num_Hoop; ++i)
hoop[i]=i+1;
result[j] = (hoop[num_Hoop/2]);
}
}
for(auto i : result)
cout<<i<<endl;
return 0;
}
Learning course: Level up from 1* to 2*
Problem Link: CodeChef: Practical coding for everyone