|
|
back to boardHELP:WA Posted by Jerry 16 Aug 2007 19:33 #include <iostream> #include <math.h> using namespace std; double store[1000000]; int main() { int i=0; while(cin>>store[i++]); for (i--;i>=0;i--) printf("%.4lf\n",sqrt(store[i])); return 0; } Finaly ACCed Posted by Jerry 16 Aug 2007 19:35 #include <iostream> #include <cstdio> #include <cmath> using namespace std; int i; double M[8000000]; int main() { double t; int n=0; while ( cin >> t ) { M[n] = sqrt( t ); n++; } for( int i=n-1; i>=0; i--) { printf("%.4f\n", M[i] ) ; } return 0; } |
|
|