chong_0428
chong_0428
全部文章
分类
归档
标签
去牛客网
登录
/
注册
chong_0428的博客
全部文章
(共63篇)
题解 | #Primary Arithmetic#
def fun(a): res = [] while a >0: t = a % 10 a = a / 10 res.append(t) return res def add(a, b): a = fun(a) ...
2024-03-21
0
211
题解 | #Financial Management#
while True: try: a = [] for i in range(12): n = float(input()) a.append(n) s = sum(a) #pri...
2024-03-21
0
189
题解 | #整数奇偶排序#
def insert_sort(a): for i in range(1, len(a)): key = a[i] j = i - 1 while j >= 0 and a[j] < key: a[j+1] ...
2024-03-21
0
208
题解 | #Biorhythms#
def shizidinli(a, b, c, d): for i in range(1, 21253): k = d + i if (k-a) % 23 == 0 and (k-b) % 28 == 0 and (k-c) % 33 == 0: ...
2024-03-21
0
200
题解 | #买房子#
def buyhoues(n, k): price = 200 flag = 0 for i in range(1, 24): if i == 1: continue else: price = ...
2024-03-20
0
190
题解 | #数制转换#
def fun(a): if a < 10: return str(a) elif a >= 10: return chr(65 + a - 10) def tentoany(a, b): res = '' wh...
2024-03-19
0
158
题解 | #String Matching#
def getNext(t): next = [0] * (len(t)+1) t = list(t) i, k = 0, -1 next[0] = -1 while i < len(t): if k == -1 or t[i] == t...
2024-03-19
0
185
题解 | #Mileage Bank#
def Mileage(a, b): if b == 'F': return 2*a elif b == 'B': return int(a + 0.5*a + 0.5) elif b == 'Y' and a >= 500: ...
2024-03-18
0
198
题解 | #Skew数#
def skew(n): s = 0 i=0 while n: i += 1 t = n % 10 n = n // 10 s += t * (2**i-1) return s while True: ...
2024-03-18
0
223
题解 | #与7无关的数#
def fun(n): flag = 0 if n % 7 == 0: return 0 while n: t = n % 10 n = n / 10 if t == 7: return ...
2024-03-18
0
168
首页
上一页
1
2
3
4
5
6
7
下一页
末页