Why I am getting TLE?

/******************************************************************************

                          Online C++ Compiler.
           Code, Compile, Run and Debug C++ program online.

Write your code in this editor and press “Run” button to compile and execute it.

*******************************************************************************/

#include

using namespace std;

int main()
{
//Declarations
int t,range,count;
cin>>t;
while(t–)
{ long long int n;
range=1;
count=1;
cin>>n;

    while(n>=range)
    {
        range=range*2;
        if(range>=n)
        {
            break;
        }
        count++;
    }
    
    cout<<count<<endl;
}//end while t loop




return 0;

}

Make variable range as long long int . Variable range is int it cannot store values larger than 10^10.

1 Like