当前位置:网站首页>Zzuli: sum of 1051 square roots
Zzuli: sum of 1051 square roots
2022-07-03 14:34:00 【Snake_____】
Title Description
The definition of sequence is as follows :
The first term of the sequence is item, Later items are the square root of the previous item , Find the front of the sequence n Sum of items .
Input
By two integers item(item<10000) and n(n<1000) form ,item and n Has the meaning set forth above .
Output
Output the sum of the sequence , Occupy a line , Precision retention required 2 Decimal place .
The sample input Copy
84 4
Sample output Copy
97.93
#include <stdio.h>
#include <math.h>
int main()
{
int n,i;
double item,sum=0;
scanf("%lf%d",&item,&n);
for(i=1;i<=n;i++)
{
sum=sum+item;
item=sqrt(item);
}
printf("%.2lf",sum);
return 0;
}边栏推荐
- Special research report on the market of lithium battery electrolyte industry in China (2022 Edition)
- 1017 a divided by B (20 points)
- Facebook 如何将 Instagram 从 AWS 搬到自己的服务器
- 7-14 sum integer segments (C language)
- tonybot 人形机器人 定距移动 代码编写玩法
- 天谋科技 Timecho 完成近亿元人民币天使轮融资,打造工业物联网原生时序数据库
- Puzzle (016.3) is inextricably linked
- 一文了解微分段应用场景与实现机制
- 编程语言:类型系统的本质
- Tailing rushes to the scientific and Technological Innovation Board: it plans to raise 1.3 billion, and Xiaomi Changjiang is the shareholder
猜你喜欢
![Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution](/img/89/da1a3a38e02671628f385de0f30369.png)
Luogu p5018 [noip2018 popularization group] symmetric binary tree problem solution

7-15 calculation of PI
![[qingniaochangping campus of Peking University] in the Internet industry, which positions are more popular as they get older?](/img/f6/fe61c84f289f0e74a45946dac687a6.jpg)
[qingniaochangping campus of Peking University] in the Internet industry, which positions are more popular as they get older?

Puzzle (016.4) domino effect

NPM install is stuck with various strange errors of node NPY

一文了解微分段应用场景与实现机制

tonybot 人形机器人 定距移动 代码编写玩法

基因家族特征分析 - 染色体定位分析

Use of constraintlayout

tonybot 人形机器人 查看端口并对应端口 0701
随机推荐
Paper sharing: generating playful palettes from images
MongoDB数据库入门的常用命令
编程语言:类型系统的本质
剑指 Offer 28. 对称的二叉树
Luogu p5194 [usaco05dec]scales s solution
Etcd cluster permission management and account password usage
tonybot 人形机器人 查看端口并对应端口 0701
Zhonggan micro sprint technology innovation board: annual revenue of 240million, net loss of 17.82 million, proposed to raise 600million
Get permissions dynamically
Understanding of closures
Stop asking yourself if you are suitable for software testing
亚马逊、速卖通、Lazada、Shopee、eBay、wish、沃尔玛、阿里国际、美客多等跨境电商平台,测评自养号该如何利用产品上新期抓住流量?
Understand the application scenario and implementation mechanism of differential segment
Tonybot Humanoïde Robot Infrared Remote play 0630
How to query the baby category of tmall on Taobao
Analysis of gene family characteristics - chromosome location analysis
Facebook 如何将 Instagram 从 AWS 搬到自己的服务器
Time conversion ()
Sendmail can't send mail and it's too slow to send. Solve it
x86汇编语言-从实模式到保护模式 笔记