首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
牛客517072235号
获赞
48
粉丝
1
关注
0
看过 TA
1
华东理工大学
2022
C++
IP属地:未知
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑牛客517072235号吗?
发布(78)
刷题
牛客517072235号
2020-05-14 10:19
C++
22157 牛牛学数列2
#include<bits/stdc++.h> using namespace std; int main() { int n; double a, i; cin>>n; for(i=1.0;i<=n;i++) a+=1.0/i; cout<<fixed<<setprecision(6)<<a<<endl; return 0; }cout<<setprecision(x)<<value<<endl; 有效位数输出cou...
0
点赞
评论
收藏
转发
牛客517072235号
2020-05-14 10:02
C++
22156 牛牛学数列
#include<bits/stdc++.h> using namespace std; int main() { int i,n,a=1,b; cin>>n; for(i=1;i<=n;i++) { b+=a*i; a*=-1; } cout<<b<<endl; return 0; }
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 19:28
C++
22015 最大最小值
#include<bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin>>a>>b>>c; if(a>c) { d=a; a=c; c=d; } if(a>b) { d=a; a=b; b=d; } if(b>c) { d=b; b=c; ...
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 19:18
C++
22014 吃瓜群众
#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; if(a%2||a==2) cout<<"NO, you can't divide the watermelon into two even parts."; else cout<<"YES, you can divide the watermelon into two even parts."; return 0; }二星就开始有数学了...我竟然忘了2是不符合...
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 19:12
C++
22012 判断闰年
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; if(n%4||(n%100==0&&n%400)) cout<<"no"; else cout<<"yes"; return 0; }闰年定义居然不是我想的那样哼qwq
0
点赞
评论
收藏
转发
牛客517072235号
2020-05-14 10:02
已编辑
C++
22011 牛可乐数
#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; if(a%2==0||a>50) cout<<"yes"; else cout<<"no"; return 0; }但是位运算也可以ac?
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 19:04
已编辑
C++
22010 牛妹数
#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; if(a%2==0&&a>50) cout<<"yes"; else cout<<"no"; return 0; } #include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; if(a%2==0&a&...
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 18:58
C++
22009 一大一小
#include<bits/stdc++.h> using namespace std; int main() { int a, b, c; cin>>a>>b; if(a<b) { c=a; a=b; b=c; } cout<<a<<endl<<b; return 0; }头文件是有.h的if是个函数,形参是个bool,如果有else的话实参是同一个
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 17:20
C++
22008 判断奇偶
#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; if(a%2)cout<<"odd"; else cout<<"even"; return 0; }快滚去复习if
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 16:56
已编辑
C++
22007 加法模拟器
#include<bits/stdc++.h> using namespace std; int main() { int a, b, c; cin>>a>>b; c=a+b; cout<<a<<"+"<<b<<"="<<c<<endl; printf("%7d\n+%6d\n-------\n%7d",a,b,c); return 0; }对不起是我的错 #include<bits/stdc++.h> using names...
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 14:19
C++
22006 四舍五入
#include<bits/stdc++.h> using namespace std; int main() { int a, b; cin>>a; b=(a+5)/10*10; cout<<b; return 0; }差点分支,感谢题解我大概是没什么算法的脑子 #include<bits/stdc++.h> using namespace std; int main() { int a, b; cin>>a; b=a/10*10; cout<<b...
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 14:10
C++
22005 计算机内存
#include<bits/stdc++.h> using namespace std; int main() { int a, b; cin>>a; b=a*1024*1024/4; cout<<b; return 0; }
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 14:05
C++
22004 温度转换
#include<bits/stdc++.h> using namespace std; int main() { double f, c; cin>>f; c=5.0/9.0*(f-32); cout<<fixed<<setprecision(3)<<c; return 0; }答案正确:恭喜!您提交的程序通过了所有的测试用例? #include<bits/stdc++.h> using namespace std; int main() { float f, c; ...
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 13:21
C++
22003 平方根
#include<bits/stdc++.h> using namespace std; int main() { int n, a; cin>>n; a=sqrt(n);//int自带向下取整 cout<<a; return 0; }
0
点赞
评论
收藏
转发
牛客517072235号
2020-04-21 13:17
C++
22002 求平均值
#include<bits/stdc++.h> using namespace std; int main() { int a, b, c; cin>>a>>b>>c; double d; d=(a+b+c)/3.0;//3.0自带强制转换格式功能 printf("%.6lf",d); return 0; }
0
点赞
评论
收藏
转发
1
2
3
4
5
6
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务