[编程入门]Sn的公式求和 摘要:解题思路:列举几个数进行观察:2=0*10+2 //易得除了第一项外,其他都是前一项*10+2。因此我们也能得出相应的关系,an=(an-1)*10+2,最后循环即可 …… 题解列表 2024年10月27日 0 点赞 0 评论 364 浏览 评分:0.0
2843: 计算2的N次方(pow解法) 摘要:解题思路:pow要用精度注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int i,n[100]; double sum=0;…… 题解列表 2024年10月26日 0 点赞 0 评论 277 浏览 评分:9.9
数学逻辑简单一点点 摘要:解题思路:首先,我们需要解决一道数学题,可以直接解题,也可以选择代具体的数字,然后把这题逻辑理清楚;然后把它用代码说出来,代码输出结果不是我们理想的结果,我们就根据结果不理想的地方再改改。注意事项:参…… 题解列表 2024年10月26日 0 点赞 0 评论 147 浏览 评分:0.0
不想暴力遍历,试图用set容器优化(感觉越写越抽象了,难绷) 摘要:解题思路: - 五位数的回文数,回文的体现主要在左右两边的两位数,形如**ijkji**,那就只用两层循环i和j就好,`k=n-(i+j)*2`,五位数的回文变动可能只有两种,即**ijkji**和…… 题解列表 2024年10月26日 0 点赞 0 评论 183 浏览 评分:0.0
编写题解 1317: 最长公共子序列lcs 摘要:解题思路:注意事项:参考代码:a,b = input().strip().split()n = len(a)m = len(b)d = [[0]*(m+1) for _ in range(n+1)]f…… 题解列表 2024年10月26日 0 点赞 0 评论 308 浏览 评分:0.0
最简单的方法!(利用最基本的语法完成编程) 摘要:解题思路:如下图所示注意事项:参考代码:#include <stdio.h>void input_image_one(int row){ int i,j; for(i=0;i<row-1;…… 题解列表 2024年10月26日 0 点赞 0 评论 336 浏览 评分:0.0
汽水瓶:n/2 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i=-1,j,n[100]; do{ scanf("%d",&n[++i]);…… 题解列表 2024年10月26日 1 点赞 0 评论 201 浏览 评分:0.0
2840: 向量点积计算 3个for 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); int i,j,arr[n],brr[n],su…… 题解列表 2024年10月26日 0 点赞 0 评论 141 浏览 评分:0.0
石子合并 区间DP+破环成链+max和min 摘要: #include using namespace std; const int N = 1100; int f1[N][N] = {0}; // 用于存储最大得…… 题解列表 2024年10月26日 0 点赞 0 评论 228 浏览 评分:9.9
循环入门练习2 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>#include <string.h>int main(){ int i, e=0; for (i …… 题解列表 2024年10月26日 1 点赞 0 评论 167 浏览 评分:9.9