编写题解 2966: 最大质因子序列 摘要:解题思路:先找因数,在判断是不是质数。注意事项:参考代码:#include <stdio.h>#include <math.h>int yinshu(int c){ for (int i = 1; i…… 题解列表 2024年03月05日 0 点赞 0 评论 476 浏览 评分:9.9
信息学奥赛一本通T1331-后缀表达式的值-Python 摘要:解题思路:定义一个Stack和对应的push和pop方法,然后将数字全部push进栈,然后根据操作符来eval计算,最后将结果pop出来。注意事项:参考代码:class Stack: def…… 题解列表 2024年03月05日 0 点赞 0 评论 526 浏览 评分:9.9
奖学金,结构体,冒泡排序,有注释 摘要:#include typedef struct date{ int number; int chin; int math; int eng; int tot; }Date;…… 题解列表 2024年03月06日 0 点赞 0 评论 433 浏览 评分:9.9
2775: 等差数列末项计算python题解 摘要:解题思路:等差数列通项公式注意事项:先算公差参考代码:a1, a2, n = map(int, input().split()) d = a2-a1 an = a1+(n-1)*d print(…… 题解列表 2024年03月06日 0 点赞 0 评论 637 浏览 评分:9.9
编写题解 2845: 求10000以内n的阶乘 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; import java.math.BigInteger; public class Main { …… 题解列表 2024年03月06日 0 点赞 0 评论 496 浏览 评分:9.9
编写题解 2790: 分段函数python 摘要:参考代码:N = float(input()) if N >= 0 and N < 5: print("%.3f" %(-N+2.5)) elif N >= 5 and N < 10: …… 题解列表 2024年03月06日 0 点赞 0 评论 806 浏览 评分:9.9
dfs标记路径 摘要:参考代码:import java.util.Scanner;public class Main {static int[][] g=new int[51][51];//地图static int[][]…… 题解列表 2024年03月06日 0 点赞 0 评论 404 浏览 评分:9.9
遍历直接秒 摘要:解题思路:你可能被题目吓到,题目要求 '?' 可以被随时替代,那也就是说明:'00、11、0?、1?、?1、?0、??'都是正确的,那我们只需要进行步长为2的遍历,对满…… 题解列表 2024年03月06日 0 点赞 4 评论 999 浏览 评分:9.9
巨大的数 C语言 百分百通过 摘要:解题思路: 题目要求多个ai相乘结果的个位数字是多少。 据此我们可以发现只有ai的个位数才能够影响结果。因而我们可以使用一个整形变量res来保存结果,进行n次循环,每次循环…… 题解列表 2024年03月06日 0 点赞 0 评论 563 浏览 评分:9.9
移动玩具 dfs 摘要:广搜太麻烦了,深搜水了过去参考代码:#include<stdio.h>#include<math.h>#include<string.h>int book[10], x[10], y[10], ex[…… 题解列表 2024年03月07日 0 点赞 0 评论 453 浏览 评分:9.9