chong_0428
chong_0428
全部文章
分类
归档
标签
去牛客网
登录
/
注册
chong_0428的博客
全部文章
(共63篇)
题解 | #A + B#
def fun(a, l): larr = [] rarr = [] c=0 k=0 m = int(l/2) op = a[m] for i in a: c+=1 if c > m: ...
2024-03-26
0
199
题解 | #寻找大富翁#
def quick_sort(a, l, r): if l >= r: return a first = l last = r m = a[l] while first < last: if first < ...
2024-03-26
0
192
题解 | #Grading#
def m(a, b): if a > b: return a else: return b def m3(a, b, c): s = [] s.append(a) s.append(b) s.append(c) ...
2024-03-23
0
226
题解 | #继续畅通工程#
#include <stdio.h> #include <stdlib.h> struct Edge { int from; int to; int cost; int build; }; int father[100]; struct E...
2024-03-23
0
237
题解 | #整除问题#
def fac(n): if n <= 2: return 2 return fac(n-1) * n def zhengchu(n, a): k = 0 n = fac(n) while n % a == 0: k +...
2024-03-23
0
173
题解 | #数字反转#
def fun1(a): arr = [] while a>0: t = a % 10 a = int(a / 10) arr.append(t) return arr def fun2(a): n = len(a...
2024-03-23
0
279
题解 | #Simple Sorting#
def merge(a, b): i = 0 j = 0 c = [] while i < len(a) and j < len(b): if a[i] < b[j]: c.append(a[i]) ...
2024-03-23
0
173
题解 | #鸡兔同笼#
def chick(a): flag = 0 arr = [] for i in range(a): for j in range(a): if 2 * i + j * 4 == a: flag = 1 ...
2024-03-23
0
227
题解 | #字符串排序#
def leng(s): a = [] for i in s: l = len(i) a.append(l) # print(a) return a def str_sort(s): flag = True a = len...
2024-03-21
0
226
题解 | #求平均年龄#
def avg(a): print('%.2f'%(sum(a)/len(a))) while True: try: age = [] n = int(input()) for i in range(n): a...
2024-03-21
0
210
首页
上一页
1
2
3
4
5
6
7
下一页
末页