题解 1525: 蓝桥杯算法提高VIP-找素数 摘要:解题思路:题目要我们筛出L-R范围内的素数,那么我们只要将这个区间中的合数踢出去不就结束了吗说起判断合数,我就想到了美猴王合数的一个性质:可以分解为两个不为1且不等于本身的因子相乘 即 n=a*b(n…… 题解列表 2021年04月16日 0 点赞 0 评论 631 浏览 评分:9.9
优质题解 高精度加法! 摘要:解题思路:小学二年纪的加法运算还记得不?就是那个列竖式计算(如下图),原理就是这个,只不过列竖式计算的时候从左到右是从高位到地位,例如234(2是百位,4是个位),而现在这个题的原理是从左到右是从低位…… 题解列表 2021年04月16日 0 点赞 0 评论 528 浏览 评分:0.0
python比较朴素的笨办法 摘要:解题思路:注意事项:参考代码:ls = []ls1 = []z = 0g = 0n = int(input())for i in range(n): a, b = map(int, input(…… 题解列表 2021年04月16日 0 点赞 0 评论 262 浏览 评分:9.9
1157:[亲和数] 摘要:解题思路:一个函数isequal来判断b是否为a的所有约数的和,是返回1,否返回0;调用函数判断两数是否均为对方的所有约数和;注意事项:参考代码:#include<stdio.h> int iseq…… 题解列表 2021年04月16日 0 点赞 0 评论 180 浏览 评分:0.0
计负均正 模块化 摘要:解题思路:模块化 一个函数功能最好计量单一,独立;注意事项:参考代码#include<stdio.h>int fushu(int a[]){ int b=0,i; for(i=0;i<2…… 题解列表 2021年04月16日 0 点赞 0 评论 349 浏览 评分:9.9
杨辉三角16行代码 简单易懂 摘要:解题思路:注意事项:参考代码:m = input().split() def YH(n): a = [[0]*(1+i) for i in range(n)] for i in …… 题解列表 2021年04月16日 0 点赞 0 评论 991 浏览 评分:9.9
筛法(赌他不卡我数据 摘要:解题思路:注意事项:参考代码#include <bits/stdc++.h>using namespace std;int a[1001000];int fuck(int x) { int ans =…… 题解列表 2021年04月16日 0 点赞 0 评论 210 浏览 评分:0.0
编写题解 1861: 程序员爬楼梯 摘要:经典动态规划:考虑最后一步f(n)=f(n-1)+f(n-3);参考代码:#include <stdio.h>#include <stdlib.h>int pa(int n){ if(n==1|…… 题解列表 2021年04月16日 0 点赞 0 评论 223 浏览 评分:0.0
(C++代码)简单深搜---慢的一批 摘要: // C++ #include using namespace std; int m; int people[10]; // 记录小朋友的money数 bool vis…… 题解列表 2021年04月16日 0 点赞 0 评论 369 浏览 评分:0.0
DP和最大子序列DP 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; int dp[100001]; int…… 题解列表 2021年04月16日 0 点赞 0 评论 322 浏览 评分:0.0