题解列表
[编程入门]C语言循环移位
摘要:解题思路:注意事项:参考代码:#include <stdio.h>
int main() {
unsigned int a, n;
// 读取输入的两个正整数
sc……
循环练习之完美数判断
摘要:#include <stdio.h>
// 函数用于判断一个数字是否是完美数
int isPerfect(int num) {
int sum = 0; // 初始化因子之和为0
……
蓝桥杯2023年第十四届省赛真题-子串简写
摘要:解题思路:分别记录首字母和尾字母出现的位置,然后遍历数组得出结果。注意事项:降低时间复杂度,不走回头路,时间复杂度由O(n2)降为O(n)。参考代码:#include<stdio.h……
1022: [编程入门]筛选N以内的素数
摘要:解题思路:注意事项:参考代码:import math
N = int(input())
arr = [True] * (N + 1)
for i in range(2, int(math.sqr……
题解 1234: 检查一个数是否为质数
摘要:解题思路:额…………注意事项:注意事项:注意事项:别抄我的,抄我的人我诅咒他电脑10秒关机参考代码:#include<bits/stdc++.h>using namespace std;int mai……
题解 2825: 计算多项式的值 (记录本题另一种计算结果精度损失的计算方式)
摘要:```c
#include
int main()
{
int i,j,n;
double x,count=1.0,count_part;
scanf("……
c++利用数组记录路径
摘要:解题思路:使用一个bool已经dfs来判断环上点的位置,详细的看代码上的注释注意事项:参考代码:#include<bits/stdc++.h>#define DZT ios::sync_with_st……