1 package test_6_3; 2 3 public class Student { 4 5 /** 6 * 编写一个程序,统计学生成绩,其功能包括输入学生的姓名和成绩, 7 * 按成绩从高到低排列打印输出,对前%70的学生定为合格(PASS),而后30%的学生定为不合格(FAIL) 8 * ...
分类:
编程语言 时间:
2020-05-01 14:37:56
阅读次数:
70
1 package test_6_1; 2 3 import java.util.Date; 4 5 public class BankAccount { 6 7 /** 8 * 设计一个BankAccount类,实现银行某账号的资金往来账目管理,包括建账号、存入、取出等。 9 * BankAcco ...
分类:
编程语言 时间:
2020-05-01 14:28:45
阅读次数:
80
两次遍历 思路: 先遍历一次得到数组长度length,第二次遍历找到位置在length-n的节点p,让p.next=p.next.next即可 代码: # Definition for singly-linked list. # class ListNode: # def __init__(self ...
分类:
其他好文 时间:
2020-05-01 10:23:41
阅读次数:
54
1 package test_5_2; 2 3 public class MaxAndMin { 4 5 public static void main(String[] args) { 6 7 /** 有10个分,去掉一个最高一个最低求平均分 */ 8 int[] numArr = {99, 97 ...
分类:
编程语言 时间:
2020-04-30 23:25:55
阅读次数:
66
1 package test_5_1; 2 3 public class SecondMax { 4 5 public static void main(String[] args) { 6 7 /** 给定一个整型数组,数组成员10个,求该数组中第二大的数的下标 */ 8 int[] numArr ...
分类:
编程语言 时间:
2020-04-30 23:13:46
阅读次数:
62
补充一个多线程场景下常使用的工具-Queue。 第一步:__init__() 1 class Queue: 2 3 def __init__(self, maxsize=0): 4 self.maxsize = maxsize 5 self._init(maxsize) 6 7 # mutex mu ...
分类:
其他好文 时间:
2020-04-30 21:23:06
阅读次数:
56
双指针法 思路: 参考三数之和,在外面多嵌套一层 代码: class Solution: def fourSum(self, nums: List[int], target: int) -> List[List[int]]: if len(nums) < 4: return [] output = ...
分类:
其他好文 时间:
2020-04-30 14:00:37
阅读次数:
54
题目描述 LL今天心情特别好,因为他去买了一副扑克牌,发现里面居然有2个大王,2个小王(一副牌原本是54张^_^)...他随机从中抽出了5张牌,想测测自己的手气,看看能不能抽到顺子,如果抽到的话,他决定去买体育彩票,嘿嘿!!“红心A,黑桃3,小王,大王,方片5”,“Oh My God!”不是顺子.. ...
分类:
其他好文 时间:
2020-04-30 13:19:55
阅读次数:
72
问题描述: def post(self, request): """登陆校验""" username = request.POST.get('username') password = request.POST.get('pwd') if not all([username, password]): ...
分类:
其他好文 时间:
2020-04-30 13:17:31
阅读次数:
73
路由泄漏 / VRF Specific default route 1、底层2、IGP3、MPLS LDP4、R2 / R4起VRF协议,并关联接口(R1 <--> R2之间运行BGP)5、BGP关系(R6:6.6.6.6/32 <--> R5 <--> Next-hop-self)6、R2去写关于 ...
分类:
数据库 时间:
2020-04-30 09:24:51
阅读次数:
81