wslcccc
wslcccc
全部文章
分类
归档
标签
去牛客网
登录
/
注册
wslcccc的博客
全部文章
(共28篇)
题解 | #2的幂次方#
import math list1 =['2(0)','2','2(2)','2(2+2(0))','2(2(2))','2(2(2)+2(0))','2(2(2)+2)','2(2(2)+2+2(0))','2(2(2+2(0)))','2(2(2+2(0))+2(0))','2(2(2+2(0...
2024-03-27
0
167
题解 | #二叉树#
def cal(m,n): if m>n: return 0 else: return cal(2*m,n)+cal(2*m+1,n)+1 while True: try: m,n = map(eval,input()...
2024-03-26
0
148
题解 | #Fibonacci#
def cal_num(n): if n == 0: return 0 elif n == 1: return 1 else: return cal_num(n-1)+cal_num(n-2) num = eval(input...
2024-03-26
0
153
题解 | #n的阶乘#
def cal_num(n): if n == 1: return 1 else: return n*cal_num(n-1) while True: try: num = int(input()) print(cal_n...
2024-03-26
0
179
题解 | #代理服务器#
while True: try: num1 = int(input()) list1 = [] list3 = [] for i in range(num1): list1.append(input())...
2024-03-21
0
214
题解 | #鸡兔同笼#
def maxNum(n): if n%2==1:return 0 if n%2==0:return n//2 def minNum(n): if n%2==1:return 0 if n%4==0:return n//4 else:return n//4+1...
2024-03-20
0
219
题解 | #大整数的因子#
def yinzi(a): f = 0 for j in a: for i in range(2, 10): if j % i == 0: f = 1 print(i,end=' ...
2024-03-20
0
178
题解 | #递推数列#
def multply(m1, m2): list1 = [[0, 0], [0, 0]] for i in range(2): for j in range(2): for k in range(2): lis...
2024-03-20
0
158
题解 | #递推数列#
def nextnum(a,b,p,q): return p*a+q*b while True: try: a0,a1,p,q,k=map(int,input().strip().split()) list1=[] list1.app...
2024-03-20
0
182
题解 | #A+B for Matrices#
while True: try: l1=list(map(int,input().strip().split())) a=l1[0] if a==0: continue b=l1[1] l...
2024-03-20
0
153
首页
上一页
1
2
3
下一页
末页