编写题解 2046: 输出全排列 摘要:import itertools n=int(input()) s=[] for i in range(1,n+1): s.append(i) num=list(itertools.…… 题解列表 2022年02月13日 0 点赞 0 评论 480 浏览 评分:9.9
编写题解 1072: 汽水瓶 摘要:while 1: t=int(input()) if t==0: break else: a=[0,1] &nb 题解列表 2022年02月13日 0 点赞 0 评论 509 浏览 评分:9.9
写题解 1045: [编程入门]自定义函数之整数处理 摘要:x=list(map(int,input().split())) x1=list(x) x1.sort() x[x.index(x1[0])],x[0]=x[0],x[x.index(x1[0]…… 题解列表 2022年02月13日 0 点赞 0 评论 583 浏览 评分:9.9
优质题解 [Sapphire]1062:公约公倍数(辗转相除法)!!!(C语言代码) 摘要:辗转相除法Sapphire2022/2/13解题思路:寻找两个数之间的最大公约数,我们所用的方法为辗转相除法(迭代),又称欧几里得算法,具体做法是用较大数除以较小数,再用出现的余数去除以除数,如此反复…… 题解列表 2022年02月13日 0 点赞 0 评论 2634 浏览 评分:9.3
更简洁(三目运算符版) 摘要:解题思路:用三目运算符,直接在宏定义的时候解决判断输出问题,更简洁。使用方法:x < 0 ? y = 10 : z = 20;这个语句被称为条件表达式,它由 3 个子表达式组成,使用问号 ? 和冒号 …… 题解列表 2022年02月13日 1 点赞 0 评论 2527 浏览 评分:9.9
Hifipsysta-1672-迷宫问题(C++代码)终于做对了 摘要:```cpp #include #include #include using namespace std; const int MAXN=100; int N,M; int fin…… 题解列表 2022年02月13日 0 点赞 0 评论 520 浏览 评分:0.0
简单打印对角线即可,i==j 摘要:```c #include int main() { int a, n, m; scanf("%d", &a); while (a--) { scanf("%d%d", &…… 题解列表 2022年02月13日 0 点赞 0 评论 551 浏览 评分:0.0
Hfipsysta-2177-信息学奥赛一本通T1252-走迷宫(C++代码)广搜BFS 摘要:```cpp #include #include #include using namespace std; const int MAXN=40; char map[MAXN][MAX…… 题解列表 2022年02月13日 0 点赞 0 评论 543 浏览 评分:0.0
1184: 众数问题 摘要:解题思路:注意事项:参考代码:n=int(input()) ls=[] for i in range(n): a = int(input()) ls.append(a) st…… 题解列表 2022年02月13日 0 点赞 0 评论 347 浏览 评分:0.0
说走就走的旅行(C++) 摘要: #include #include using namespace std; int main() { …… 题解列表 2022年02月13日 0 点赞 0 评论 742 浏览 评分:0.0