首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
mlx
2026年3月14日 18:33
迭代求立方根 题解:
P1379
回复 0
|
赞 0
|
浏览 106
#include<iostream> using namespace std; double x; int n; int main() { while(cin>>x>>n) { double y=x; while(n--) y=y*2/3+x/(3*y*y); printf("%.6f\n",y); } return 0; }
RingoCrystal
2025年2月8日 15:47
迭代求立方根 题解:说是迭代,方程都给了,不如直接dp带迭代
P1379
回复 0
|
赞 7
|
浏览 1.1k
#include <bits/stdc++.h> using namespace std; int main(){ double x;int n; while(cin>>x>>n){ std::vector<double> a(n+1); a[0]=x; for(int i=1;i<=n;i++){ a[i]=a[i-1]*2.0/3.0+x/(3.0*a[i-1]*a[i-1]); } ...
lielie
2023年6月5日 09:28
迭代求立方根 题解:
P1379
回复 0
|
赞 6
|
浏览 3.1k
#include <iostream> #include <cstdio> using namespace std; int main(){ // x是被求立方根的数 double x; int iteration; double y0; while(cin >> x >> iteration){ ...
题目
迭代求立方根
题解数量
3
发布题解
在线答疑
热门题解
1
迭代求立方根 题解:说是迭代,方程都给了,不如直接dp带迭代
2
迭代求立方根 题解:
3
迭代求立方根 题解: