人生苦短,但求成长
人生苦短,但求成长
全部文章
题解
归档
标签
去牛客网
登录
/
注册
人生苦短,但求成长的博客
全部文章
/ 题解
(共64篇)
题解 | #自动售货系统#琢磨了半天,终于出来了,鼓励下
class GoodSystem(): # 商品名称 goods_names = ['A1', 'A2', 'A3', 'A4', 'A5', 'A6'] # 商品价格 goods_price = [2, 3, 4, 5, 8, 6] # 每种商品的数量 ...
Python3
2022-02-25
11
857
题解 | #记负均正#
while True: try: n = int(input()) num_list = list(map(int, input().split())) a, b = [], [] for i in num_list: if i > 0: ...
Python3
2022-02-24
17
2830
题解 | #表示数字#
while True: try: str_input = input() result = '' for i in range(len(str_input)): if not str_input[i].isdecimal(): resu...
Python3
2022-02-24
3
407
题解 | #人民币转换#就是要考虑的情况太多啦
import math def fun(each): """ 处理整数部分,按4位分割处理 """ each_desc = '' n = len(each) flag = True for i in range(n, 0, -1): ...
Python3
2022-02-24
1
499
题解 | #记票统计#一次循环就解决了吧
while True: try: n = int(input()) name_list = input().split() m = int(input()) vote_list = input().split() ...
Python3
2022-02-23
82
1915
题解 | #数组分组#递归YYDS
def fun(sum3, sum5, other): if sum3 == sum5 and len(other) == 0: return True elif len(other) == 0: return False else: ...
Python3
2022-02-23
5
461
题解 | #在字符串中找出连续最长的数字串#
while True: try: sub_str = [] max_len = 0 str_input = input() for i in range(len(str_input)): for...
Python3
2022-02-22
3
517
题解 | #走方格的方案数#递归YYDS
def methods(n, m): if n == 0 or m == 0: return 1 if n == 1 and m == 1: return 2 if (n == 2 and m == 1) or (n == 1 and m =...
Python3
2022-02-22
6
700
题解 | #合法IP#
while True: try: ip_str = input().split('.') if len(ip_str) != 4: print('NO') else: for each in ip_str: if len...
Python3
2022-02-22
3
448
题解 | #24点运算#主要还是怎么计算24点
import itertools def fun(a, b, c, d): card_dict = { '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, ...
Python3
2022-02-22
9
1274
首页
上一页
1
2
3
4
5
6
7
下一页
末页