首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
骑士小迷弟
获赞
0
粉丝
0
关注
5
看过 TA
4
南京航空航天大学
2022
C工程师
IP属地:未知
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑骑士小迷弟吗?
发布(3)
刷题
骑士小迷弟
2021-09-08 16:59
C工程师
题解 | #质数因子#C解法
//C解法#include<stdio.h>#include<math.h>int main(){ long in=0; long maxIndex; scanf("%ld",&in); maxIndex=sqrt(in); for(long i=2;i<=maxIndex;i++) { while(in%i==0) { printf("%ld ",i); //每个质数因子输出要空格 in=in/i; ...
0
点赞
评论
收藏
转发
骑士小迷弟
2021-09-08 13:00
C工程师
题解 | #字符串最后一个单词的长度#
//计算某字母出现次数#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){ char arr[1024]; char ch; int j=0; while((ch=getchar())!='\n') //读入字符串 { arr[j]=ch; j++; } int len=strlen(arr); //待查找的字符 ch=getchar(); int count=0; //某字母出现的次数计数...
0
点赞
评论
收藏
转发
骑士小迷弟
2021-09-08 11:00
C工程师
题解 | #字符串最后一个单词的长度#
include<stdio.h> include<string.h> int main(){ char str[5000]={0}; int count=0; //最后单词长度计数 fgets(str,sizeof(str)-1,stdin); //sizeof(str)=5000 //str包含换行\n,所以下面要减1 int len=strlen(str)-1; //strlen()会返回碰到的第一个'\0'之前的字符数 if(len<=0) { printf("0\n&qu...
0
点赞
评论
收藏
转发
1
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务