首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
诗奕
获赞
9
粉丝
1
关注
14
看过 TA
55
女
北京邮电大学
2027
Java
IP属地:天津
^^[持续>>coding--不坠青云之志]^^
私信
关注
拉黑
举报
举报
确定要拉黑诗奕吗?
发布(246)
刷题
诗奕
04-08 12:44
北京邮电大学 计算机类
题解 | #实现接口#
import java.util.Scanner; public class Main { public static void main(String[] args) { Comparator comparator = new ComparatorImpl(); Scanner scanner = new Scanner(System.in); while (scanner.hasNextInt()) { int x = scanner.nextInt(); int y = scan...
java相关
0
点赞
评论
收藏
转发
诗奕
04-08 12:37
已编辑
北京邮电大学 计算机类
题解 | #类型判断#
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { String className = scanner.next(); Base obj = (Base) Class.forName(className).ne...
java相关
0
点赞
评论
收藏
转发
诗奕
04-08 12:28
北京邮电大学 计算机类
题解 | #定义打印方法#
import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { String className = scanner.next(); // print就是需要你定义的方法 print(Class.fo...
java相关
0
点赞
评论
收藏
转发
诗奕
04-08 12:15
北京邮电大学 计算机类
题解 | #验证年龄#
import java.util.Scanner; public class Main { public static void main(String[] args) { Person p = new Person(); Scanner sc = new Scanner(System.in); while (sc.hasNextInt()) { p.setAge(sc.nextInt()); System.out.println(p.getAge()); } }...
java相关
0
点赞
评论
收藏
转发
诗奕
04-08 12:08
已编辑
北京邮电大学 计算机类
题解 | #修改Data类的定义#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNextInt()) { int x = scanner.nextInt(); int y = scanner.nextInt(); Data data = new Data(x, y); ...
java相关
0
点赞
评论
收藏
转发
诗奕
04-07 19:47
已编辑
北京邮电大学 计算机类
题解 | #二维数组求和#
public class Main { public static void main(String[] args) { int[][] arr = {{11,33,55},{22,44,66,88},{131,214,315,146},{928,827,726,625},{424,525}}; int sum=add(arr); System.out.println(sum); } public static int add(int[][] arr) { int sum=0; for ...
java相关
0
点赞
评论
收藏
转发
诗奕
04-07 19:44
北京邮电大学 计算机类
题解 | #数组倒转#
import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { int[] arr = new int[6]; Scanner sc = new Scanner(System.in); for (int i = 0; i < arr.length; i++) { arr[i] = sc.nextInt(); } Sys...
java相关
0
点赞
评论
收藏
转发
诗奕
04-07 19:36
北京邮电大学 计算机类
题解 | #数组遍历#
import java.util.Scanner; public class Main { public static void main(String[] args) { int[] arr = new int[6]; Scanner sc = new Scanner(System.in); for (int i = 0; i <arr.length ; i++) { arr[i]=sc.nextInt(); } int max=arr[0]; int mi...
java相关
0
点赞
评论
收藏
转发
诗奕
04-07 18:48
北京邮电大学 计算机类
题解 | #补全构造方法#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNextInt()) { int x = scanner.nextInt(); int y = scanner.nextInt(); int z = scanner.nextInt(); ...
java相关
0
点赞
评论
收藏
转发
诗奕
04-07 18:44
北京邮电大学 计算机类
题解 | #求最小公倍数#
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int m = sc.nextInt(); int n = sc.nextInt(); int result = getCM(m, n); System.out.println(result); } public static int getCM(int ...
java相关
0
点赞
评论
收藏
转发
诗奕
04-07 18:18
北京邮电大学 计算机类
题解 | #邮箱验证#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String str = scanner.next(); String emailMatcher="[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+"; //write your code here...... ...
java相关
0
点赞
评论
收藏
转发
诗奕
04-06 22:25
北京邮电大学 计算机类
题解 | #计算整数位数#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int num = scan.nextInt(); int count=0; if(num<=0){ System.out.println(num); }else { while (num!=0){ ...
java相关
0
点赞
评论
收藏
转发
诗奕
04-06 22:20
北京邮电大学 计算机类
题解 | #统计输入正数个数#
import java.util.*; public class Main { public static void main(String[] args) { int count = 0; Scanner sc = new Scanner(System.in); while (sc.nextInt()>0) { count++; } System.out.println(count); } }
java相关
0
点赞
评论
收藏
转发
诗奕
04-06 22:13
北京邮电大学 计算机类
题解 | #数列求和#
public class Main { public static void main(String[] args) { long sum=0; long number=0; for (int i = 0; i < 10; i++) { number+=9*Math.pow(10,i); sum+=number; } System.out.println(sum); } }
java相关
0
点赞
评论
收藏
转发
诗奕
04-06 22:06
北京邮电大学 计算机类
题解 | #判断学生成绩等级#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String grade =sc.next(); if(grade.equals("A")){ System.out.println("优秀"); }else if(grade.equals("B&quo...
java相关
0
点赞
评论
收藏
转发
1
2
3
4
5
6
17
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务