首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
408真题
专业课程
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
RingoCrystal
2025年2月8日 15:47
迭代求立方根 题解:说是迭代,方程都给了,不如直接dp带迭代
P1379
回复 0
|
赞 2
|
浏览 325
#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
|
赞 5
|
浏览 2.4k
#include <iostream> #include <cstdio> using namespace std; int main(){ // x是被求立方根的数 double x; int iteration; double y0; while(cin >> x >> iteration){ ...
题目
迭代求立方根
题解数量
2
发布题解
在线答疑
热门题解
1
迭代求立方根 题解:
2
迭代求立方根 题解:说是迭代,方程都给了,不如直接dp带迭代