当前位置:网站首页>[Code Hoof Set Novice Village 600 Questions] Find the square root of the given data
[Code Hoof Set Novice Village 600 Questions] Find the square root of the given data
2022-07-29 18:33:00 【Sandm*】
Title link:
Code Foot Collection (matiji.net)
Things to solve the problem:
- The floor(x) function in the title refers to rounding down,
is the largest integer not greater than x
So there is no need to judge whether the input data is a perfect square number,
Because even if it's not a perfect square,
The result of the final floor (x) rounded down is the same
Note:
The return type of floor(x) is double
- sqrt() function is C, C++ specially used to find the square root of a number
Reference code:
#includeusing namespace std;int main( ){int data = 0;cin >> data;printf("%d",(int)floor(sqrt(data)));return 0;} 边栏推荐
猜你喜欢

The structure of the earth's over 200 million proteins is fully predicted, and AlphaFold detonates the "protein universe"

传统渲染农场和云渲染农场选择哪个好?

「硬核」labelme 图片中显示标签

Mathematical Analysis_Proof_Two Important Limits (Tongji Version)

Chapter 7 XGBoost
![[STM32CubeMX] STM32H743 configuration IAP upgrade](/img/4b/2445d6c9dd16d45c1ac7adddbf0ae6.png)
[STM32CubeMX] STM32H743 configuration IAP upgrade
![[Code Hoof Set Novice Village 600 Questions] Given an integer n, find all the values of x and y in floor(n/x)=y](/img/c4/7cf18fca07c8d6550cadea2c3c9db4.png)
[Code Hoof Set Novice Village 600 Questions] Given an integer n, find all the values of x and y in floor(n/x)=y

UNIX Environment Advanced Programming Chapter 3

刚刚,60后复旦校友IPO敲钟:市值400亿

Learn to arthas, 3 years experience with 5 years work force you!
随机推荐
母公司冲刺IPO卡壳,驾考宝典遇多地驾校“抵制”风波
lua-调试技巧
本周投融报:CeFi积聚风投吸引力
Pagination with LIMIT
P4775 [NOI2018] Intelligence Center (Line Segment Tree Merging)
针不戳!腾讯云架构师出品的《MySQL性能优化和高可用架构实践》
The difference between firmware, driver and software
go的堆内存结构分析
生物JC TRIM37防止凝集物组织的异位纺锤体极点的形成,以确保有丝分裂的保真度
一文搞定代码中的命名
starlight.js几何图形背景js特效插件
Thread Dump分析方法
MySQL数据库基础
抗HER2/neu受体拟肽修饰的紫杉醇自蛋白纳米粒/环境敏感型多糖纳米粒的制备,
Blender 源码解析(1)
One's deceased father grind English vocabulary training camp Day 17 】 -- espresso, ultimate, gradually, detect, dimension
leetcode94 -- 二叉树的中序遍历
「记录」MMDetection入门篇
2022 年 WebAssembly 应用现状
巴比特 | 元宇宙每日必读:连续七个季度出现亏损,Meta元宇宙部门Q2亏损28 亿美元,扎克伯格称这种情况可能会持续数年...