首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
牛客848562759号
获赞
20
粉丝
1
关注
3
看过 TA
5
西南石油大学
2020
Java
IP属地:四川
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑牛客848562759号吗?
发布(13)
刷题
牛客848562759号
2022-02-20 19:06
Java
题解 | #汽水瓶#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext()) { int count=0; int n=Integer.parseInt(sr.nextLine()); if(n==0) break;//如果输入n=0,则...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-19 18:10
Java
题解 | #坐标移动#
import java.util.*; import java.util.regex.*; public class Main { public static void main(String[] args) { Scanner sr = new Scanner(System.in); while(sr.hasNext()) { int x = 0;//横坐标 int y = 0;//纵坐标 String str=sr.nextLine(); String[] ch_str=str.split(";"); String re...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-18 23:13
Java
题解 | #名字的漂亮度#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext()) { int n=Integer.parseInt(sr.nextLine());//获取名字个数n for (int i=0;i<n ;i++ ) { String name=sr.nextLine();//获取名字 fun(name); } } sr.cl...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-18 09:41
Java
题解 | #求最小公倍数#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext()) { int a=sr.nextInt(); //该编译器存在问题,若使用Integer.parseInt(sr.nextLine())则会报“数组越界”错误 int b=sr.nextInt(); for (int i=1;i<=a*b;i++ )//设a和b的...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-17 19:10
Java
题解 | #高精度整数加法#
import java.util.*; import java.math.*;//引入包含BigInteger(21亿以上的大整数)类的包 public class Main { public static void main(String[] args) { fun(); } public static void fun() { Scanner sr=new Scanner(System.in); while(sr.hasNext()) { String str1=sr.nextLine(); String str2=sr.nextLine();...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-17 15:18
Java
题解 | #截取字符串#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext()) { String str1=sr.nextLine();//字符串长度设为n,1=<n<=100 //String str1=sr.nextInt();若使用这种输入语句,保存并提交编译会出现“数组越界”...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-17 10:21
Java
题解 | #找出字符串中第一个只出现一次的字符#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext()) { int signal=0; String str=sr.nextLine(); for (int i=0;i<str.length() ;i++ ) { if (str.indexOf(str.charAt(i))==str.lastIndexOf(str.charA...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-16 21:29
Java
题解 | #记负均正#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext()) { int count1=0,count2=0; double sum=0.0; int n=sr.nextInt(); int[] ar=new int[n]; for (int i=0;i<n ;i++ ) { ar[i]=sr.nextInt(); ...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-16 09:28
Java
题解 | #统计大写字母个数#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext())//若有输入,则返回true { int count=0; String str= sr.nextLine();//获取一行字符串 for(int i=0;i<str.length();i...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-15 11:19
已编辑
Java
题解 | #统计字符#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext())//判断是否有输入,若有输入,则返回true { int count1=0,count2=0,count3=0,count4=0; //由于存在多组输入,所以必须在while循环内进行初始化 S...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-15 11:09
已编辑
Java
题解 | #简单密码#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext()) { String str1=sr.nextLine(); char[] charray; charray=str1.toCharArray();//将字符串转换为数组 ...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-15 11:23
已编辑
Java
题解 | #计算某字符出现次数#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext())//判断是否有输入,有输入则返回true { String str1=sr.nextLine();//输入一行字符串,可输入空格 char ch=sr.next().charAt(0);//输入一个字符 ...
0
点赞
评论
收藏
转发
牛客848562759号
2022-02-15 11:21
已编辑
Java
题解 | #查找输入整数二进制中1的个数#
public class Main { public static void main(String[] args) { Scanner sr=new Scanner(System.in); while(sr.hasNext()) //判断是否有输入,若有输入则返回true,满足多组输入输出要求 { int m=sr.nextInt(); String str1=Integer.toBinaryString(m); //获取二进制字符串 ...
0
点赞
评论
收藏
转发
1
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务