python最大配对简单解法 摘要:B=[]n=int(input())A=list(map(int,input().split()))A.sort() #正序排序(小到大)b=list(map(int,input().split()…… 题解列表 2023年02月02日 0 点赞 0 评论 350 浏览 评分:0.0
python两行代码通过 摘要:##### 关于找到规律之后python两行代码通过这件事 ```python n,s=map(int,input().split()) print ((int(s)+int(2**(n+1)-…… 题解列表 2023年02月01日 0 点赞 0 评论 485 浏览 评分:9.0
1127基础解法(Python) 摘要:解题思路:可以用数学原理,也可以当做找规律注意事项:参考代码:n = int(input())cubic = pow(n, 3)square = pow(n, 2)if square % 2 == 0…… 题解列表 2023年02月01日 0 点赞 0 评论 365 浏览 评分:0.0
数字的处理与判断 摘要:```python while True: try: a = list(map(int, input())) b = a[-1: -7: -1] print(len(a)) …… 题解列表 2023年01月31日 0 点赞 0 评论 463 浏览 评分:2.0
年会题解解解 摘要:解题思路:记忆化搜索(深度搜索+动态规划)+树观察题目发现可以将学校各教职工关系构建成一颗树,由题目限制可得,对于树中任意一个节点都应该有1.自己来,学生不来。2.自己不来,学生来或学生不来两种情况,…… 题解列表 2023年01月31日 0 点赞 0 评论 502 浏览 评分:0.0
1223: 敲七游戏 摘要:解题思路:一行解,融入许多函数,运行很爽。注意事项:参考代码:print(len(set(list(map(lambda x : x+1 if (x % 7 == 0 or '7' i…… 题解列表 2023年01月31日 0 点赞 0 评论 677 浏览 评分:0.0
python最简短做法 摘要:解题思路: 在一篇博客找到的原理图。可以根据此图设计六个方向,x,y轴方向如图所示。注意事项: 可以注意到点变化的方向只有(1,0)、(-1,0)、(0,1)、(0,-1)、(1,1)、(-1,-1)…… 题解列表 2023年01月30日 1 点赞 2 评论 1395 浏览 评分:9.5
菜鸟首次尝试(python)超简单解法 摘要:解题思路:注意事项:参考代码:n=int(input())for _ in range(n): x,y=map(int,input().split()) def realsum(n): …… 题解列表 2023年01月29日 0 点赞 0 评论 415 浏览 评分:8.0
二分法,求阶乘 摘要:解题思路:通过规律发现:5!-> end 0 number is 110-> end 0 number is 215->end 0 number is 3…………注意事项:参考代码:import os…… 题解列表 2023年01月29日 0 点赞 0 评论 721 浏览 评分:0.0
字符排列问题 摘要:解题思路:注意事项:参考代码:方法一:直接全排列再去重from itertools import permutationstry: while True: a=input() …… 题解列表 2023年01月29日 0 点赞 0 评论 309 浏览 评分:0.0