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

What is happening?
Posted by Savchuk Nickolay 24 Mar 2021 16:51
Why is here the runtime error on the 6 test?
What test is 6?

#include <iostream>
#include <cmath>
using namespace std;

void ghjkl(long double p)
{cout << fixed;
cout.precision(4);
cout << p << endl;}

int main() {
long double a[1000]={-1.0};
long long i=0;
while(cin)
{cin >> a[i];
i++;}
i=i-2;
long double b[1000];
for(int k=0; k<1000; k++)
{b[k]=sqrt(a[k]);}
for(int m=i; m>=0; m--)
{ghjkl(b[m]);}
return 0;
}

Edited by author 24.03.2021 16:53

Edited by author 24.03.2021 16:54
Re: What is happening?
Posted by Vladislav 31 Mar 2021 19:27
i don't know

Edited by author 31.03.2021 19:27

Edited by author 31.03.2021 19:27

Edited by author 31.03.2021 19:27