ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Why I am getting TLE in c++ ? Please help.
Posted by Muhammad Abdullah 7 Sep 2019 11:05


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

int main(){
    long long n, res;
    vector <long long> vt;
    while(cin>>n){
        vt.push_back(n);
    }
    int len = vt.size();

    for(int i = len-1; i >= 0; i--){
        double n = sqrt(vt[i]);
        printf("%0.4lf\n", n);
    }

return 0;
}

Edited by author 07.09.2019 11:05

Edited by author 07.09.2019 11:11