Ural 1001. Reverse Root(没有输入结束的坑爹题)
AC代码:
发布日期:2021-11-06 16:56:40
浏览次数:5
分类:技术文章
本文共 828 字,大约阅读时间需要 2 分钟。
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 ≤ 10 18). 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 |
---|---|
1427 0 876652098643267843 5276538 | 2297.0716936297014.11640.000037.7757 |
#include#include double a[300000],p;int main(){ int i=0,n; while(scanf("%lf",&p)!=EOF)//没有输入结束的标志 a[i++]=sqrt(p); for(n=i-1;n>=0;n--) printf("%.4lf\n",a[n]); return 0;}
转载地址:https://blog.csdn.net/YJX_xx/article/details/37654777 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
表示我来过!
[***.240.166.169]2024年04月01日 17时08分56秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
itertools处理迭代
2019-04-26
iterable对象 yeield
2019-04-26
一些实用的快捷键
2019-04-26
添加打印机,在windows上面和Ubuntu上面
2019-04-26
Prepare the data
2019-04-26
scipy.misc.imresize改变图像的大小
2019-04-26
np.all的实例应用
2019-04-26
custom_transforms
2019-04-26
scipy.misc.imread函数,读取图片
2019-04-26
pytorch 训练数据以及测试 全部代码(1)
2019-04-26
pytorch 训练数据以及测试 全部代码(2)
2019-04-26
pytorch 训练数据以及测试 全部代码(3)
2019-04-26
Linux中ping命令
2019-04-26
numpy与Image互转以及它们的size不同,还有关于plt
2019-04-26