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

Najmaddin Akhundov Why wrong answer?, please help!! [1] // Problem 1001. Reverse Root 12 Oct 2014 09:52
#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

int main()
{
    double n;
    vector<double> v;


    int a = 1;
    while (a==1)
    {
        cin >> n;
        v.push_back(n);
        if (cin.peek() == '\n')
            a = 0;
    }

    for (int i = 0; i <= v.size() - 1; i++)
    {
        //cout << sqrt(v[v.size() - 1 - i]) << endl;
        printf("%.4f\n", sqrt(v[v.size() - 1 - i]));


    }

    cout << endl;

}
kuzyakiev Re: Why wrong answer?, please help!! // Problem 1001. Reverse Root 8 Jan 2015 06:08
out of type.
for ex. 876652098643267843 out of double