melon.
melon.
全部文章
分类
归档
标签
去牛客网
登录
/
注册
melon.的博客
全部文章
(共117篇)
题解 | #N个数之和#
fuck = input() nums = map(int,input().split()) sum = 0 for i in nums: sum += i print(sum)
2023-01-14
1
273
题解 | #牛牛逆序输出#
print(input()[::-1])
2023-01-07
1
234
题解 | #牛牛的排列数#
def f(m,n): if n == 1: return m return m * f(m-1,n-1) m,n = map(int,input().split()) print(f(m,n))
2023-01-07
0
224
题解 | #牛牛的Hermite多项式#
def h(n,x): if n == 0: return 1 if n == 1: return 2 return 2 * x * h(n-1,x) - 2*(n-1) * h(n-2,x) n,x = map(int,input().s...
2023-01-07
0
232
题解 | #牛牛的digit#
def digit(x,i): return x[-int(i):] x,i = input().split() print(digit(x,i))
2023-01-06
1
276
题解 | #牛牛的西格玛#
def f(n): if n == 1: return 1 return n + f(n - 1) n = int(input()) print(f(n))
2023-01-06
1
233
题解 | #牛牛的10类人#
def f(n): n = bin(n)[2:] zero = n.count('0') one = n.count('1') if (zero % 2 == 0) and (one % 2 != 0): return '0' elif (o...
2023-01-06
1
237
题解 | #牛牛的四叶玫瑰数#
def func(n,sum = 0): s = str(n) for i in s: sum += int(i) ** 4 if sum == n: return True return False a,b = map(...
2023-01-06
1
280
题解 | #牛牛的替换#
def f(s,a1,a2,a3,a4): if (a1 not in s) and (a3 not in s): return s if a1 in s: s = s.replace(a1,a2) if a3 in s: s ...
2023-01-06
1
227
题解 | #牛牛的素数判断#
def f(n): # 判断 n 是否为素数 if n == 2: return 'true' for i in range(2,n): if n % i == 0: return 'false' return '...
2023-01-06
1
212
首页
上一页
3
4
5
6
7
8
9
10
11
12
下一页
末页