1152: C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m)-题解(python) 摘要:解题思路:注意事项:参考代码:n = int(input())s = 1if n == 1: print("{:.6f}".format(s))else: for i in range(2…… 题解列表 2021年10月23日 0 点赞 0 评论 786 浏览 评分:9.0
1152: C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) 摘要:解题思路:从2开始一直到m,用n保存起来,最后用一去减去n。注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; …… 题解列表 2022年06月18日 0 点赞 0 评论 461 浏览 评分:9.0
编写题解 1152: C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) 摘要:解题思路:注意事项:参考代码:n = int(input())t = 1for i in range(2,n+1): t -= 1/(i*i)print('%.6f'%t)…… 题解列表 2021年12月14日 0 点赞 0 评论 636 浏览 评分:9.0
C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m)-题解(C语言代码) 摘要:##题解 1152: 【C语言训练】计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) 代码如下: ```c #include #include int main(…… 题解列表 2019年07月18日 0 点赞 0 评论 1904 浏览 评分:9.3
C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) (C语言代码) 摘要:参考代码:#include<stdio.h>#include<math.h>int main(void){ double t = 1; int i,m; scanf("%d",…… 题解列表 2019年05月07日 1 点赞 4 评论 2381 浏览 评分:9.5
t=1-1/(2*2)-1/(3*3)-...-1/(m*m)(C++简单代码) 摘要:解题思路:注意事项:用double更加精确参考代码:#include<iostream> using namespace std; #include<iomanip> int main() {…… 题解列表 2022年10月28日 0 点赞 0 评论 828 浏览 评分:9.9
吾乃元始天尊!!!1152: C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) 摘要:```c #include int main() { double m,sum=2; scanf("%lf",&m); while(m>=1) { …… 题解列表 2022年12月14日 0 点赞 0 评论 701 浏览 评分:9.9
1152: C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m) 摘要:```cpp #include #include using namespace std; int main() { int m; double t=1; ci…… 题解列表 2022年10月23日 0 点赞 0 评论 602 浏览 评分:9.9
最普通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b; double t=0; scanf("%d",&a); for(b=2…… 题解列表 2024年11月18日 0 点赞 0 评论 361 浏览 评分:9.9