lidgew
lidgew
全部文章
分类
题解(7)
归档
标签
去牛客网
登录
/
注册
lidgew的博客
全部文章
(共7篇)
HJ二维数组操作(two_dimension_array)
题干描述比较复杂,其实题目挺简单的。The discreption is hard to conprehension, well the question is a little simple.Object_Oriented(面向对象解法): #two dimension array class t...
面向对象
2021-02-28
0
2
HJ61放苹果(递归与动态规划)
两种算法:1.递归算法:recursion programmingFor m apples and n baskets, laying methods==n baskets are laying,remainding apples (m-n) put to n basket+all apples ...
递归
动态规划
2021-02-24
0
6
HJ87-密码强度等级
面向对象,构建密码类及内置函数完成解题。 import sys class pswdscore(): #class password score's calculate def __init__(self,pswd): #initial object,one par...
字符串
类
2021-02-22
0
4
HJ91走方格的方案数
Two solving methods:(动态规划和递归)1.Dynamic programming,build route_array-like Yanghui_triangle,time complexity less than recursion,by observing we can get...
递归
数组
动态规划
2021-02-21
0
7
华为机试66:配置文件恢复
solve:create dictionary to solve import sys #create commend dictionary command={'reset':'reset what','reset board':'board fault','board add':'where to...
字典
2021-02-20
0
111
华为机试--完全数计算python3
python好写,但是确实太慢solve 1:conmmon calculate,一般解法 def perfnum(n): if n<4:return 0 else: pnn=0 for mm in range(4,n+1): #calculat...
因数
字典
2021-02-20
1
148
华为机试:密码验证合格程序(python3.9)
华为机试:密码验证合格程序主要运用面向对象构建类,解决 import sys class checkpwd(): #initial object type_num=0 child_str=False def __init__(self,pwd): se...
2021-02-18
2
74