老司机叫你上车
老司机叫你上车
全部文章
分类
题解(3)
归档
标签
去牛客网
登录
/
注册
老司机叫你上车的博客
全部文章
(共26篇)
题解 | #统计每个月兔子的总数#
while True: try: month = int(input()) lis = [0] * month for i in range(month): if i < 2: li...
华为笔试练习-python
2021-10-07
5
507
题解 | #输入整型数组和排序标识,对其元素按照升序或降序进行排序#
def func(i,lst,bol): i1= int(i) bol1 = bool(int(bol)) lst1 = list(map(int,lst)) lst1.sort(reverse= bol1) lst2 = [ str(x) for x in ...
华为笔试练习-python
2021-09-28
9
1014
题解 | #记负均正#
依题意得 while True: try: n=int(input()) nums=map(int,input().split()) positive=[] negative=0 for j in nums: ...
华为笔试练习-python
2021-09-19
10
1810
题解 | #公共子串计算#
while True: try: str_1=input() ...
华为笔试练习-python
2021-08-24
7
663
题解 | #表达式求值#
#!/usr/sbin/python # -*- coding: utf-8 -*- while True: try: &nbs...
华为笔试练习-python
2021-08-22
0
392
参数解析python简洁易懂
s = input() flag = 0 start = end = i = sum = 0 res = [] while i < len(s): #如果不带引号直接解析 if s[i] == ' ': sum += 1 end = i ...
华为笔试练习-python
2021-04-04
11
1469
二维数组操作(Python)
感谢讨论区 “辣条虾” 朋友的注释和代码,这屎一样的题干(这真不是在模拟甲方吗?)让我自己敲我可能真的忍不了。 while True: try: m, n = map(int, input().split()) x1, y1, x2, y2 = map(int...
华为笔试练习-python
2021-03-29
25
1798
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 ...
华为笔试练习-python
2021-02-24
19
2629
华为机试--完全数计算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...
华为笔试练习-python
2021-02-20
4
1837
python3
def func(): num = float(input()) res = num + 0.5 ...
华为笔试练习-python
2021-02-15
99
3282
首页
上一页
1
2
3
下一页
末页