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 wrong answer?, please help!!
Posted by Najmaddin Akhundov 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;

}
Re: Why wrong answer?, please help!!
Posted by kuzyakiev 8 Jan 2015 06:08
out of type.
for ex. 876652098643267843 out of double