题解列表

筛选

2525: 信息学奥赛一本通T1627-最大公约数

摘要:解题思路:用c就不用想了,需要用到高精度,甚至高精度压位,用欧几里得算法也不行了,需要用二进制算法,比赛的时候要用一两百行。求教大佬后Python两行搞定。参考代码:from math import ……

[编程入门]阶乘求和

摘要:解题思路:注意事项:参考代码:n = int(input())a = 0jiecheng = 1l = 0for i in range(1, n+1):    a += 1    jiecheng *……

编写题解 1995: 画三角形

```pythonwhileTrue:n=int(input())foriinrange(1,n+1):print(('/\\'*i).center(2*n,""))```———————————————————————————————

python-倍数问题

摘要:解题思路:注意事项:参考代码:from cmath import inf                 n,k = map(int,input().strip().split())     ……

1483: 蓝桥杯算法提高VIP-数组替换

解题思路:注意事项:参考代码:m,n=map(int,input().split())a=list(map(int,input().split()))b=list(map(int,input().split()))t,y=map(int,input().split())c=a[:t]+b[:y]+a[

python-正则问题

摘要:解题思路:遇到‘(’时,res = res + dfs()遇到‘|’时,res = max(res,dfs())注意事项:参考代码:def dfs():       global s       ……