Ural-1001. Reverse Root(水题)
2013-06-30 19:10
316 查看
1001. Reverse Root
Time limit: 2.0 second Memory limit: 64 MB The problem is so easy, that the authors were lazy to write a statement for it!Input
The input stream contains a set of integer numbers Ai (0 ≤ Ai ≤ 1018). The numbers are separated by any number of spaces and line breaks. A size of the input stream does not exceed 256 KB.Output
For each number Ai from the last one till the first one you should output its square root. Each square root should be printed in a separate line with at least four digits after decimal point.Sample
input | output |
---|---|
[code] 1427 0 876652098643267843 5276538 | 2297.0716 936297014.1164 0.0000 37.7757 [/code] |
思路:用Vector保存输入数据,从后往前遍历
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace std; vector<double>v; int main() { double a; int cnt=0; // freopen("in.txt","r",stdin); while(scanf("%lf",&a)!=EOF) { // printf("%lf ",a); v.push_back(sqrt(a)); } // printf("\n"); for(int i=v.size()-1;i>=0;i--) { printf("%.4lf\n",v[i]); } return 0; }
相关文章推荐
- 【解题报告】 URAL 1192 Ball in a Dream -- 物理模拟水题
- ural&nbsp;1563.&nbsp;Bayan(水题)
- URAL 1136 Parliament 二叉树水题 BST后序遍历建树
- URAL - 1821 Biathlon(水题)
- URAL 1136 Parliament 二叉树水题 BST后序遍历建树
- URAL 1991 The battle near the swamp 水题
- URAL - 1788 On the Benefits of Umbrellas(水题)
- URAL 1136 Parliament 二叉树水题 BST后序遍历建树
- URAL 2015 Zhenya moves from the dormitory(水题)
- URAL 1215. Exactness of Projectile Hit(水题,请绕行。。)
- Python3 ural水题集锦
- URAL 1877 Bicycle Codes 水题
- URAL1011 - Conductors - 水题
- ural 1014【水题,不过有点阴人】
- URAL1001 - Reverse Root - 水题
- DFS水题 URAL 1152 False Mirrors
- URAL 2056 Scholarship 水题
- URAL 1880 Psych Up's Eigenvalues multiset水题
- URAL - 1018 (树形dp 水题)
- ural 2032 Conspiracy Theory and Rebranding (数学水题)