1022: [编程入门]筛选N以内的素数 摘要:解题思路:注意事项:参考代码:import math N = int(input()) arr = [True] * (N + 1) for i in range(2, int(math.sqr…… 题解列表 2024年04月05日 0 点赞 0 评论 415 浏览 评分:0.0
扫雷 - 队列解法 摘要:思路 : > 先将所有排雷火箭加入队列, 然后遍历所有未引爆的雷, 如果当前排雷火箭可以引爆 > 未引爆的雷,将未引爆的雷加入队列 时间复杂度 : 最坏 O(mn), 即每个排雷火箭都无法引…… 题解列表 2024年04月05日 1 点赞 0 评论 812 浏览 评分:9.9
DP解法(C++代码) 摘要:解题思路: 确定dp的含义 定义f[i][2],其中f[i][0]表示到达第i个杆子下方所需要的最小时间,f[i][1]表示到达第i个杆子传送门所需要的最少时间。 …… 题解列表 2024年04月05日 2 点赞 0 评论 881 浏览 评分:10.0
循环练习之完美数判断 摘要:#include <stdio.h> // 函数用于判断一个数字是否是完美数 int isPerfect(int num) { int sum = 0; // 初始化因子之和为0 …… 题解列表 2024年04月05日 0 点赞 0 评论 574 浏览 评分:0.0
[编程入门]C语言循环移位 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main() { unsigned int a, n; // 读取输入的两个正整数 sc…… 题解列表 2024年04月05日 0 点赞 0 评论 504 浏览 评分:0.0
计算球体积胡扯版 摘要:解题思路:先看一眼别人的答案注意事项:记得球的体积是三分之四派啊的平方参考代码:#include<stdio.h>#define PI 3.1415926int main(){ float r,…… 题解列表 2024年04月05日 2 点赞 0 评论 533 浏览 评分:0.0
字符类型统计常规c语言,不用指针,不用定义函数,简单代码 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[100]; gets(str); int…… 题解列表 2024年04月05日 0 点赞 0 评论 399 浏览 评分:9.9
C语言温度转换题解 摘要:参考代码:#include<stdio.h> int main() { float c, F; scanf("%f", &F); c = 5*(F - 32) / 9; printf("c…… 题解列表 2024年04月04日 0 点赞 0 评论 623 浏览 评分:0.0
易如反掌之自定义函数之数字分离 摘要:解题思路:遍历循环字符串长度,依次输出。注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[100]; sc…… 题解列表 2024年04月04日 1 点赞 0 评论 480 浏览 评分:9.9
C语言密码编译—putchar 摘要:参考代码:#include<stdio.h> int main() { char c1 = 'C', c2 = 'h', c3 = 'i', c4…… 题解列表 2024年04月04日 0 点赞 0 评论 504 浏览 评分:0.0