My issue
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
long long int n;
cin>>n;
int steps=0;
for(int i=0; pow(2,i)<=n; i++){
steps++;
}
cout<<pow(2,steps-1)<<endl;
}
return 0;
}
Problem Link: DCE05 Problem - CodeChef