T1015 求和 四行解决 摘要:解题思路:注意事项:参考代码:a,b,c=map(int, input().strip().split())def f1(a,b,c): lst=[sum([i for i in range(1,a+…… 题解列表 2025年05月03日 0 点赞 0 评论 17 浏览 评分:0.0
利用递归求解 摘要:解题思路:依次写出求前n项整数和、求平方和和求倒数和的函数,然后在主函数将对应的部分累加,最后再将三个求和的部分再相加即可注意事项:注意精度,为防止丢失精度,主函数里增加一个变量total并将其设置为…… 题解列表 2025年04月06日 1 点赞 0 评论 132 浏览 评分:10.0
C语言简单解法 摘要:此题较为基础,需要一点逻辑思维#includeint main(void){ long long a,b,c,n1=0,n2=0; double n3=0; scanf…… 题解列表 2025年02月26日 0 点赞 0 评论 506 浏览 评分:10.0
1015: [编程入门]求和训练 摘要:解题思路:注意事项:参考代码:def oa(i): fxa=0 while i!=0: fxa…… 题解列表 2025年01月20日 0 点赞 0 评论 498 浏览 评分:0.0
编写题解 1015: [编程入门]求和训练python 摘要:参考代码:a,b,c=map(int,input().split())s1=0s2=0s3=0for i in range(1,a+1): s1+=ifor i in ran…… 题解列表 2025年01月12日 0 点赞 0 评论 266 浏览 评分:0.0
编写题解 1015: [编程入门]求和训练 文章 > 编写题解 摘要:解题思路:注意事项:注意最后输出时要保留两位小数,sum3+=1 . 0/i时1需要+.0参考代码:#include<bits/stdc++.h>using namespace std;i…… 题解列表 2025年01月10日 0 点赞 0 评论 338 浏览 评分:0.0
6行代码解决求和训练 摘要:解题思路:注意事项:参考代码:a, b, c = map(int, input().split())A = sum(range(1, a+1)) # 计算1到a的自然数之和B = sum([i**2…… 题解列表 2024年12月08日 1 点赞 3 评论 456 浏览 评分:10.0
灭有感情,全是for//和数学题解//(C语言 摘要:解题思路:for的自增设定注意事项:注释那里可直接代替前个for参考代码:#include<stdio.h>int main(){ int a,b,c,i; float sum1=0,sum2=0,s…… 题解列表 2024年11月26日 5 点赞 0 评论 625 浏览 评分:0.0
题解 1015: [编程入门]求和训练(最基础的方法) 摘要:解题思路:最简单的方法,简单易懂注意事项:平方和,倒数的表示参考代码:a,b,c = map(int,input().split()) suma = 0 sumb = 0 sumc = 0 f…… 题解列表 2024年11月14日 3 点赞 0 评论 422 浏览 评分:10.0
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b,i,s1=0,s2=0; double c,s3=0…… 题解列表 2024年11月13日 0 点赞 0 评论 361 浏览 评分:0.0