一个for循环阶乘求和 摘要:解题思路:用a1表示阶乘的结果,再相加即可注意事项:a1和Sn的数据类型是long long int 参考代码:#include<bits/stdc++.h>using namespace std;i…… 题解列表 2023年12月06日 0 点赞 0 评论 112 浏览 评分:0.0
编写题解 2778: 判断数正负 摘要:解题思路:注意事项:范围可不写:去掉 import java.util.*;和 if( Math.pow(-10,9) < n && n <= Math.pow(10,9)){} 即可参考代码:im…… 题解列表 2023年12月06日 0 点赞 0 评论 352 浏览 评分:0.0
C语言考试练习题_一元二次方程--java语言 摘要:解题思路:①导入Scanner②输入a,b,c③输出x1,x2④保留两位输出注意事项:①导入②开方计算时使用sqrt(若没有提前导入Math,则需要在运行时写上:Math.sqrt())参考代码:im…… 题解列表 2023年12月06日 0 点赞 0 评论 116 浏览 评分:0.0
堆栈的使用 摘要:解题思路:注意事项:参考代码:def stack_operation(commands): stack = [] output = [] for command in command…… 题解列表 2023年12月06日 0 点赞 0 评论 193 浏览 评分:0.0
行编辑程序 摘要:解题思路:注意事项:参考代码:def line_editor(input_str): stack = [] output = '' for char in input…… 题解列表 2023年12月06日 0 点赞 0 评论 156 浏览 评分:0.0
收费--java语言 摘要:解题思路:注意事项:使用double数据类型参考代码:import java.util.Scanner; public class Main { public static void mai…… 题解列表 2023年12月06日 0 点赞 0 评论 173 浏览 评分:0.0
模拟计算器--java语言 摘要:解题思路:注意事项:输入字符的写法非nextChar() 正确写法为:next().charAt(0)参考代码:import java.util.Scanner; public class Ma…… 题解列表 2023年12月06日 0 点赞 0 评论 102 浏览 评分:0.0
整数平均值(报错) 摘要:解题思路:注意事项在这个代码运行时,报错error ld returned 1 exit status这个问题其实我代码本身没有问题,是因为我上一个代码运行结果未关闭造成的报错。error ld re…… 题解列表 2023年12月06日 0 点赞 0 评论 115 浏览 评分:0.0
2902:输出最高分数的学生姓名 python实现(极简方法) 摘要:解题思路:本来想保存最大值,然后找对应的名字,后面发现找到最大值的时候可以直接用student保存学生的名字,最后直接输出该名字即可。注意事项:没有用到字典。参考代码:n = int(input())…… 题解列表 2023年12月06日 1 点赞 0 评论 225 浏览 评分:0.0
n阶Hanoi塔问题 摘要:解题思路:注意事项:参考代码:def hanoi(n, a, b, c, count): if n > 0: count = hanoi(n-1, a, c, b, count) …… 题解列表 2023年12月06日 0 点赞 0 评论 171 浏览 评分:0.0