巧妙处理素数问题(python) 摘要:解题思路:将因子输入列表中,元素个数仅为2时,判定为素数。注意事项:参考代码:def f(n): s=[] for i in range(1,n+1): if n%i==0:…… 题解列表 2021年08月17日 0 点赞 0 评论 326 浏览 评分:9.9
《C语言考试练习题_保留字母》题解 代码仅10行~ 摘要:题目背景:说真的,这题不值黄题!看到过后觉得是一道大水题解题思路:algorithm是个好东西,里面有个叫“isalpha”的函数可以用来判断是否为字母,用法为isalpha(_CharT)注意事项:…… 题解列表 2021年08月17日 0 点赞 0 评论 409 浏览 评分:9.9
python求解的最基础解法,步骤清晰,易懂!!!(python) 摘要:解题思路:注意事项 参照用例注意保留三位有效数字参考代码:import mathdef positive(a,b,c): delta=b**2-4*a*c s=math.sqrt(d…… 题解列表 2021年08月17日 0 点赞 0 评论 475 浏览 评分:6.0
[编程入门]二维数组的转置 AC代码 摘要:解题思路:注意事项:参考代码:#includeusing namespace std;void Transpose(int arr[3][3]){ for (int i = 0; i < 3; i++…… 题解列表 2021年08月17日 0 点赞 0 评论 348 浏览 评分:9.9
链表插入的两种姿势,中间插入和尾插 摘要:解题思路:先构建两个链表,然后按照链表内的学号进行升序排序,这里我的思路是每次插入前找到比链表2待插入的节点学号大的节点,然后进行插入注意事项:参考代码:#include<stdio.h>#inclu…… 题解列表 2021年08月17日 0 点赞 0 评论 409 浏览 评分:9.9
jiechenheshu11111111000 摘要:解题思路:注意事项:参考代码:#include "stdio.h"#include "math.h"int J(int n) //求阶乘{ if (n == 1||n==0)return 1; i…… 题解列表 2021年08月16日 0 点赞 0 评论 190 浏览 评分:0.0
[编程入门]矩阵对角线求和 Python解决 摘要:解题思路: 使用列表取值注意事项: 索引要选对参考代码: a = list(map(int,input().split())) b = list(map(int,input()…… 题解列表 2021年08月16日 0 点赞 0 评论 893 浏览 评分:8.0
[编程入门]三个数最大值 Python解决 摘要:解题思路: 使用倒序,sort函数注意事项: sort的参数reverse=False是升序,也是默认的,True为降序参考代码: a = list(map(int,inpu…… 题解列表 2021年08月16日 0 点赞 0 评论 1852 浏览 评分:9.0
[编程入门]第一个HelloWorld程序! Python解决 摘要:解题思路: 直接print就OK注意事项: Hello World!中间不能有符号等,例如:Helo,World!参考代码: print("*********************…… 题解列表 2021年08月16日 0 点赞 0 评论 421 浏览 评分:7.0
[竞赛入门]简单的a+b Python解决 摘要:解题思路: 简单的加法,使用while循环即可参考代码: while True: n = list(map(int,input().split())) …… 题解列表 2021年08月16日 0 点赞 6 评论 2094 浏览 评分:9.9