首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
年华201905241506786
获赞
0
粉丝
0
关注
6
看过 TA
4
河北农业大学
2018
数据仓库
IP属地:北京
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑年华201905241506786吗?
发布(83)
评论
刷题
收藏
年华201905241506786
关注TA,不错过内容更新
关注
08-06 13:46
河北农业大学 数据仓库
题解 | 用列表实现栈
import sys stack = [1,2,3,4,5] stack.pop() print(stack) stack.pop() print(stack) a = input() stack.append(int(a)) print(stack)
0
点赞
评论
收藏
分享
08-05 09:41
河北农业大学 数据仓库
题解 | 牛牛的反转列表
import sys num = [3, 5, 9, 0, 1, 9, 0, 3] num.reverse() print(num)
0
点赞
评论
收藏
分享
08-04 18:22
河北农业大学 数据仓库
题解 | 列表的长度
import sys str = input() print(len(str.split()))
0
点赞
评论
收藏
分享
08-01 13:49
河北农业大学 数据仓库
题解 | 编写个人所得税计算程序
import java.util.*; public class Main { public static void main(String[] args) { List<Employee> employees = new ArrayList<>(); //write your code here...... // 新建三个employee对象,将对象添加进list Employee enp = new Employee("小明",2500); Employee enp2 = new Employee("小军",8000); Em...
0
点赞
评论
收藏
分享
2024-12-05 17:42
河北农业大学 数据仓库
题解 | #输出某一年的各个月份的天数#
import java.util.Calendar; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner console = new Scanner(System.in); int year = console.nextInt(); //write your code here...... //获取Calendar的实例 Calendar calendar = Calendar.getInstance(); //循环遍历所有的月份 for (int mont...
0
点赞
评论
收藏
分享
2024-12-05 17:37
河北农业大学 数据仓库
题解 | #求绝对值,平方根,对数,正弦值#
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); double num = scanner.nextDouble(); //write your code here...... System.out.println(Math.abs(num)); System.out.println(Math.sqrt(num)); System.out.println(Math.log(num)); Sys...
0
点赞
评论
收藏
分享
2024-12-05 17:30
河北农业大学 数据仓库
题解 | #十进制数转二进制数#
import java.util.*; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int num = scanner.nextInt(); //write your code here...... System.out.print(Integer.toBinaryString(num)); } }
0
点赞
评论
收藏
分享
2024-12-05 17:03
河北农业大学 数据仓库
题解 | #创建单例对象#
public class Main { public static void main(String[] args) { Singleton s1 = Singleton.getInstance(); Singleton s2 = Singleton.getInstance(); System.out.println(s1 == s2); } } class Singleton { private static Singleton instance; private Singleton() { } //write your code here...... public static synch...
0
点赞
评论
收藏
分享
2024-12-05 16:53
河北农业大学 数据仓库
题解 | #实现抽象方法#
import java.util.Scanner; public class Main { public static void main(String[] args) { // Sub是需要你定义的子类 Base base = new Sub(); Scanner scanner = new Scanner(System.in); while (scanner.hasNextInt()) { int x = scanner.nextInt(); int y = scanner.nextInt(); base.setX(x); base.setY(y); System.out.println(...
0
点赞
评论
收藏
分享
2024-12-05 16:47
河北农业大学 数据仓库
题解 | #类型判断#
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).newInstance(); System.out.println(getClassName(o...
0
点赞
评论
收藏
分享
2024-12-05 15:12
河北农业大学 数据仓库
题解 | #反转链表#
import java.util.*; /* * public class ListNode { * int val; * ListNode next = null; * public ListNode(int val) { * this.val = val; * } * } */ public class Solution { /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param head ListNode类 * @return ListNode类 */ public ListNode ReverseList (ListNode he...
0
点赞
评论
收藏
分享
2024-12-05 14:06
河北农业大学 数据仓库
题解 | #重写计算逻辑#
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(); Sub sub = new Sub(x, y); sub.calculate(); } } } class Base { private int x; private in...
0
点赞
评论
收藏
分享
2024-12-05 13:38
河北农业大学 数据仓库
题解 | #补全构造方法#
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(); Sub sub = new Sub(x, y, z); System.out.println(sub.calculat...
0
点赞
评论
收藏
分享
2024-12-05 13:31
河北农业大学 数据仓库
题解 | #验证年龄#
import java.util.Scanner; public class Main { public static void main(String[] args) { Person p = new Person(); Scanner scanner = new Scanner(System.in); while (scanner.hasNextInt()) { int age = scanner.nextInt(); p.setAge(age); System.out.println(p.getAge()); } } } class Person { private int age; /...
0
点赞
评论
收藏
分享
2024-12-05 13:12
河北农业大学 数据仓库
题解 | #修改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); System.out.println(data.getX() + data.getY()); } } } class...
0
点赞
评论
收藏
分享
1
2
3
4
5
6
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务