当前位置:网站首页>acwing 790. The third root of a number (dichotomy)
acwing 790. The third root of a number (dichotomy)
2022-06-13 09:25:00 【Age worry】
subject :790. The third root of a number
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
double n;
scanf("%lf",&n);
double i=-10000,j=10000;
while(i+1e-8<j){
double mid=(i+j)/2;
if(mid*mid*mid<n) i=mid;
else j=mid;
}
printf("%.6lf",i);
return 0;
}
边栏推荐
- LeetCode 72. Edit distance
- LeetCode 343. integer partition
- 20211028 Stabilizability
- LeetCode 1143. 最长公共子序列
- Leetcode points to offer 30 Stack containing min function
- 20211018 some special matrices
- C language: data storage in memory
- The turtle library displays the system time
- (bfs+GOOD) acwing 845. Eight digit
- HAProxy + Keepalived实现MySQL的高可用负载均衡
猜你喜欢
C/s model and P2P model
Online debugging tool Arthas advanced
(dp+ memory) acwing 901 skiing
Final principle
Dynamic display of analog clock using digital clock in turtle Library
C language: Simulated Implementation of library function strcpy
JUC 原子累加器 源码之 LongAdder
The turtle library displays the system time
Jenkins access openldap user authentication
(dfs+ pruning + checkerboard problem +dood) acwing 843 N-queen problem
随机推荐
Timestamp to localdate
7-3 virus traceability (20 points)
JUC atomic accumulator
(state compression dp+good) acwing 291 Mondrian's dream
拜登:希望尽快签署两党枪支安全改革法案
20211108 det(AB)=det(A)det(B)
I have summarized the knowledge points of JS [intermediate and advanced] for you
C language: recursive function to realize Hanoi Tower
Simple use of spiel expressions
批量读取文件夹下的全部语音文件
IP address introduction
Simulink variant model and variant subsystem usage
Library management system based on wechat applet Rar (thesis + source code)
时间戳转localDate
LeetCode 202. Happy number
攻防世界PWN play 条件竞争漏洞的利用
Online debugging tool Arthas Foundation
Tutorial (5.0) 04 Fortint cloud services and scripts * fortiedr * Fortinet network security expert NSE 5
Can the operation of the new BMW I3 meet the expectations of the famous products of the 3 series?
JUC 原子累加器 源码之 LongAdder