1015匿名函数解法(Python)
摘要:注意事项:其实写在一行,不过展示出来太臃肿,如果有优化的一行解写法请在评论区留言参考代码:lst = list(map(int, input().split()))print('{:.2f}&……
[编程入门]求和训练题解(C语言)
摘要:解题思路:注意事项:参考代码:#includeint main()
{
int a,b,c; //定义题目所给3个变量
float Sa,Sb,Sc; ……
编写题解 1015: [编程入门]求和训练
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int a,b,x=0,y=0; float c,i,z=0.0,sum; sc……
C语言使用自定义函数和不使用自定义函数解决这个问题
摘要:解题思路:该题求和可分割为三个部分再最终求和,在次我用两种方法解决。参考代码:一:自定义函数解法:#include <stdio.h>#include <math.h>//求第一部分1+2+3+……+……
编写题解 1015: [编程入门]求和训练
摘要:解题思路:注意事项:cout<<std::fixed<<setprecision(2)<<xxx=====cout<<setiosflags(ios::fixed)<<setprecision(2)<……
通过递归解决各种问题
摘要:解题思路:找到递归思路注意事项:看清题目参考代码:#include<stdio.h>int qiua(int a){ if(a==1) return 1; return qiua(a-1)+a;}in……
编写题解 1015: [编程入门]求和训练
摘要:解题思路:建立三个for循环依次求和a,b,c参考代码:a, b, c = map(int, input().split())A = 0for i in range(1, a+1): A += ……
1015: [编程入门]求和训练
摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().split())a1,b1,c1=0,0,0for i in range(a+1): a1+=ifor j in ran……