首页
比赛
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
平方根
21条解析
开通博客写题解
我是一只小肚肚
发表于 2021-02-21 09:29:49
奈何本人的知识储备有限,就采取了循环;见谅 int main() { int n, i; scanf("%d", &n); for (i = 1;i <= n; i++) { if((i*i)>n) {
展开全文
张田懿
发表于 2020-12-12 12:56:09
include<bits/stdc++.h> int main(){ int n,sq=0; scanf("%d",&n); sq=floor(sqrt(n)); printf("%d",sq); return 0;}
麻花蘸豆浆
发表于 2020-02-08 16:44:30
include<stdio.h> include<math.h> main(){int n,m; scanf("%d",&n);m=sqrt(n); //整形数据间的运算本身就包含向下取整printf("%d",m);}
为我弹首琴吧
发表于 2023-12-17 16:42:03
#include<stdio.h> #include<math.h> int main() { int n,t; scanf("%d",&n); t=sqrt(n); &
展开全文
一名蒟蒻
发表于 2023-10-19 17:13:52
方法一: ```// 牛顿送代法 #include<bits/stdc++.h> using namespace std; int n; double f( int m ) { double last = m; double ans = m; ans = ( ans + m
展开全文
潍坊鲨鱼公园儿童大学
发表于 2021-01-23 08:57:08
#include <cmath> #include <iostream> using namespace std; int main() { double num; cin >> num; double root = sqrt(num)
展开全文
HUAYI_SUN
发表于 2022-09-30 08:00:24
#include<iostream> using namespace std; #include<cmath> int main() { int a;
展开全文
易烊千玺圈外女友
发表于 2021-05-14 20:02:14
#include <stdio.h> #include <math.h> int main() { int a,b; scanf("%d",&a); b=sqrt(a); printf("%d\n",b); return 0;
展开全文
牛客517072235号
发表于 2020-04-21 13:21:05
#include<bits/stdc++.h> using namespace std; int main() { int n, a; cin>>n; a=sqrt(n);//int自带向下取整 cout<<a; retur
展开全文
已注销
发表于 2021-02-02 18:41:13
#include<stdio.h> int main(){ int n; scanf("%d",&n); printf("%d",(int)sqrt(n)); } 补标题:
查看本题
查看本题讨论
相关比赛
18201-2021暑假准大一生编程练习1
进入比赛
18210-寰宇测试1
进入比赛
18214-编程练习之顺序结构
进入比赛
18388-暑假第一周Java基础训练
进入比赛
18839-牛客竞赛语法入门班顺序结构习题
进入比赛
等你来战
查看全部
哈尔滨华德学院第十六届程序设计竞赛(同步赛)
报名截止时间:2025-05-12 20:00
牛客小白月赛116
报名截止时间:2025-05-16 21:00
2025年ICPC新疆维吾尔自治区大学生程序设计竞赛
报名截止时间:2025-05-08 10:00
牛客AI人机大战巅峰赛1
报名截止时间:2025-05-17 17:00
牛客周赛 Round 93
报名截止时间:2025-05-18 21:00
衡阳师范学院第二十五届程序设计竞赛(同步赛)
报名截止时间:2025-06-07 18:30
2025牛客暑期多校训练营1
报名截止时间:2025-07-15 17:00
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题