python 写法的递归 摘要:n=int(input())#判断是否是质数def ys(n): for x in range(2,n): if n%x==0: return False …… 题解列表 2023年10月25日 0 点赞 0 评论 141 浏览 评分:9.9
FJ的字符串(python代码) 摘要:解题思路:观察给出的几个例子,发现每一个字符串都是由上一个字符串、一个由N决定的字母、上一个字符串的反切片组成注意事项:使用了string模块中的ascii_uppercase,生成了一个含有所有大写…… 题解列表 2023年10月24日 0 点赞 0 评论 314 浏览 评分:9.9
1074: 数字整除 - Python 摘要:解题思路: 1、将输出的字符作为string类型,不转变为int. 2、将输入的数字(string类型)利用list()转变为数组,利用切片得到对应的数组。 3、将数组转为int,进…… 题解列表 2023年10月24日 0 点赞 0 评论 139 浏览 评分:0.0
石头剪刀布 摘要:解题思路:注意事项:参考代码:ls=["Rock", "Scissors", "Paper"]a=b=0x=0f=[]N = int(input())for i in range(N): a,b = …… 题解列表 2023年10月23日 0 点赞 0 评论 349 浏览 评分:9.9
懂得都懂,不懂的我也没办法 摘要:from collections import defaultdict def num_dc(A): res = 0 n = N dp = [defaultdict(i…… 题解列表 2023年10月23日 0 点赞 0 评论 215 浏览 评分:9.9
11111111111111111 摘要:解题思路:A,B=map(int,input().strip().split())n=A*Bprint(n)注意事项:111111111参考代码:111111111111…… 题解列表 2023年10月22日 0 点赞 0 评论 346 浏览 评分:0.0
钟神赛车Python(菜鸟第一次写,查了好几个函数,有点笨) 摘要:解题思路:用到了两个函数1.sys模块里的stdin,解决了多行输入的问题2.itertools里的permutations函数,用于生成钟神车速的所有排列组合再用for循环对钟神和某君的车速进行对比…… 题解列表 2023年10月22日 0 点赞 1 评论 159 浏览 评分:9.9
编写题解 1671: 小九九 摘要:````python for i in range(1,10): for j in range(1,10): if i>=j: print("{1}…… 题解列表 2023年10月20日 0 点赞 0 评论 220 浏览 评分:0.0
动态规划母牛的故事 摘要:解题思路:注意事项:参考代码:N = [] # 所有要求的年份(题意是求第n年初,所有之后索引值要减一) while 1: n = int(input()) if…… 题解列表 2023年10月20日 0 点赞 0 评论 295 浏览 评分:7.0
1019: [编程入门]自由下落的距离计算 摘要:```python m,n=map(int,input().split()) s=0 for i in range(1,n+1): s+=3m/2*i b = m/2i print(“%.…… 题解列表 2023年10月20日 0 点赞 0 评论 324 浏览 评分:6.0