首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
子明爱吃糖
获赞
42
粉丝
16
关注
66
看过 TA
501
男
西南石油大学
2026
Java
IP属地:四川
……
私信
关注
拉黑
举报
举报
确定要拉黑子明爱吃糖吗?
发布(39)
评论
刷题
收藏
子明爱吃糖
关注TA,不错过内容更新
关注
2024-06-03 22:51
西南石油大学 Java
题解 | #计算单位阶跃函数#
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner scan = new Scanner(System.in); while(scan.hasNextInt()) { int time = scan.nextInt(); if(time > 0) { System.out.println(1); } else if(time == 0) { System.out.println(0.5); } else { System.out.println(0); ...
0
点赞
评论
收藏
分享
2024-06-03 22:34
西南石油大学 Java
题解 | #HTTP状态码#
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNextInt()) { int ans = sc.nextInt(); switch (ans) { case 200: System.out.println("OK"); break; case 202: System.out...
0
点赞
评论
收藏
分享
2024-06-03 22:28
西南石油大学 Java
题解 | #牛牛的一周#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int day = scanner.nextInt(); if (day == 1) { System.out.print("Monday"); } else if (day == 2) { System.out.print("Tuesday"); } else if (day == 3) { Sys...
0
点赞
评论
收藏
分享
2024-05-31 08:28
西南石油大学 Java
题解 | #健康评估#
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double weight = sc.nextDouble(); double height = sc.nextDouble(); double BMI = weight / (height * height); if (BMI >= 18.5 && B...
0
点赞
评论
收藏
分享
2024-05-30 22:27
西南石油大学 Java
题解 | #牛牛的判断题#
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int l = sc.nextInt(); int r = sc.nextInt(); if(x>=l&&x<=r){ System.out.println("true"); }els...
0
点赞
评论
收藏
分享
2024-05-30 07:57
西南石油大学 Java
题解 | #判断是元音还是辅音#
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { String str = sc.next(); if (str.equalsIgnoreCase("A") || str.equalsIgnoreCase("E") || str.equal...
0
点赞
评论
收藏
分享
2024-05-29 23:01
西南石油大学 Java
题解 | #判断整数奇偶性#
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); // 注意 hasNext 和 hasNextLine 的区别 while (in.hasNextInt()) { // 注意 while 处理多个 case int a = in.nextInt(); if(a%2==0){ System.out.println("...
0
点赞
评论
收藏
分享
2024-05-28 22:22
西南石油大学 Java
题解 | #及格分数#
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int ans = sc.nextInt(); if(ans>=60){ System.out.println("Pass"); }else{ System.out.println("Fail&qu...
0
点赞
评论
收藏
分享
2024-05-28 22:19
西南石油大学 Java
题解 | #你是天才吗?#
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while(sc.hasNext()){ int ans = sc.nextInt(); if(ans>=140){ System.out.println("Genius"); } } } }
0
点赞
评论
收藏
分享
2024-05-27 22:39
西南石油大学 Java
题解 | #小乐乐改数字#
import java.util.Scanner; // 注意类名必须为 Main, 不要有任何 package xxx 信息 public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); StringBuilder sb = new StringBuilder(); //从个位依次判断 0 or 1进行拼接 while(n>0){ int m = n%10%2==0?0:1; sb.append(m); n =...
0
点赞
评论
收藏
分享
2024-05-27 18:07
西南石油大学 Java
题解 | #查看不同年龄段的用户明细#
select device_id , gender , (case when age<20 or age is null then "其他" when age >=20 && age <=24 then "20-24岁" else "25岁及以上" end) as age_cut from user_profile;
0
点赞
评论
收藏
分享
2024-05-27 15:09
西南石油大学 Java
题解 | #查看不同年龄段的用户明细#
select device_id , gender , (case when age<20 or age is null then "其他" when age >=20 && age <=24 then "20-24岁" else "25岁及以上" end) as age_cut from user_profile;
0
点赞
评论
收藏
分享
2024-05-27 13:46
西南石油大学 Java
题解 | #计算25岁以上和以下的用户数量#
SELECT CASE WHEN age<25 OR age IS null THEN "25岁以下" else "25岁及以上" END AS age_cut, count(device_id) AS number FROM user_profile GROUP BY age_cut
0
点赞
评论
收藏
分享
2024-05-26 12:33
西南石油大学 Java
题解 | #高级操作符练习(1)#
select device_id, gender, age, university, gpa from user_profile where gender = 'male' and gpa > 3.5;
0
点赞
评论
收藏
分享
2024-05-26 12:28
西南石油大学 Java
题解 | #查找除复旦大学的用户信息#
select device_id , gender , age , university from user_profile where university !='复旦大学';
0
点赞
评论
收藏
分享
1
2
3
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务