首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
奥特曼退休了
小米集团_软件研发工程师
获赞
150
粉丝
81
关注
4
看过 TA
265
男
南京航空航天大学
2022
C++
IP属地:广东
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑奥特曼退休了吗?
发布(35)
刷题
奥特曼退休了
2020-12-07 16:03
小米集团_软件研发工程师
C++ 除数其实不需要判断是否为质数
//什么是质因子...这里其实就是把它分解为质数相乘的形式 //其实除的过程中不需要判断除数是不是质数,因为如果能被合数整除,一定会先被比它更小的质数整除,所以只需从2开始遍历除数即可 //但是我这个还是判断了,懒得改了 #include<iostream> using namespace std; bool is_prime(int num){//判断是否为质数 if(num==1){ return false; } else{ for(int i=2;i*i<=num;++i){ if(num...
0
点赞
评论
收藏
转发
奥特曼退休了
2020-12-06 12:21
小米集团_软件研发工程师
C++ 思路简单
#include<iostream> using namespace std; int main(){ string a; while(getline(cin,a)){ int res=0; int pos=a.find('x'); for(int i=pos+1;i<a.size();++i){ int tmp=0; if(a[i]>='A'&&a[i]<='F'){ tmp=10+(a[i]-'A');...
0
点赞
评论
收藏
转发
奥特曼退休了
2020-12-05 16:17
小米集团_软件研发工程师
C++ 思路简单,答案也简单
#include<iostream> using namespace std; int main(){ string a; bool b=false; while(b||getline(cin,a)){ b=false; if(a.size()==8){ cout<<a<<endl; } else if(a.size()<8){ int dist=8-a.size(); string tmp(d...
0
点赞
评论
收藏
转发
奥特曼退休了
2020-12-04 16:33
已编辑
小米集团_软件研发工程师
C++ 利用set去重排序
#include<iostream> #include<vector> #include<algorithm> #include<set> using namespace std; int main(){ int N; while(cin>>N){//每个数组 vector<int>tmp; int a; while(N--&&cin>>a){//将数组输入进去 tmp.push_back(a); ...
0
点赞
评论
收藏
转发
奥特曼退休了
2020-12-04 16:22
小米集团_软件研发工程师
C++ set去重排序
#include<iostream> #include<vector> #include<algorithm> #include<set> using namespace std; int main(){ int N; while(cin>>N){//每个数组 vector<int>tmp; int count=0; int a; while(count<N&&cin>>a){//将数组输入进去 ...
0
点赞
评论
收藏
转发
1
2
3
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务