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

help me
Posted by kaikaijia 8 Aug 2011 20:39
MY code is wronganswer .why? Can you help me?I'm grateful for you help

#include<iostream>
#include<cmath>
#include<stack>
#include<iomanip>
#include<cstdio>
using namespace std;
typedef unsigned long long ull;

stack<double> st;
int main()
{
    ull a;
    cin>>a;
    while(!cin.eof())
    {
      st.push(sqrt((double)a));
      cin>>a;
    }

    cout<<setprecision(4)<<fixed;
    while(!st.empty())
    {
       cout<<st.top()<<endl;
       st.pop();
    }
//  system("pause");
}