编写题解 1018: [编程入门]有规律的数列求和--解题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<iostream>#include<iomanip>using namespace std;int main (){ …… 题解列表 2022年03月06日 0 点赞 0 评论 550 浏览 评分:0.0
有规律的数列求和(python) 摘要:N = int(input())a = 1b = 2sum_ = 0for i in range(1,N+1): sum_ += b/a temp = a a = b b = …… 题解列表 2022年03月06日 0 点赞 0 评论 288 浏览 评分:0.0
[编程入门]有规律的数列求和 摘要:解题思路:注意事项: 想复杂了参考代码:#includeint main() { float i=2.0,j=1.0,k,J,n,N; scanf("%f",&N); …… 题解列表 2022年03月07日 0 点赞 0 评论 211 浏览 评分:0.0
编写题解 1018: [编程入门]有规律的数列求和 摘要:解题思路:有一分数序列: 2/1 3/2 5/3 8/5 13/8 21/13...... 求出这个数列的前N项之和,保留两位小数。方法一:如果把数列规律认为a/b=2/1;c/d=3/2;m=a+c…… 题解列表 2022年03月14日 0 点赞 0 评论 196 浏览 评分:0.0
数组递归,还能求第n个数 摘要:参考代码:#include<stdio.h>int main(){float a[100]={2,3}; float b[100]={1,2}; int n=0; scanf("%d",&n); i…… 题解列表 2022年03月23日 0 点赞 0 评论 411 浏览 评分:0.0
有规律的数列求和 摘要:解题思路:注意事项:参考代码:import java.util.*;public class Main {public static void main(String args[]) { Scanne…… 题解列表 2022年03月25日 0 点赞 0 评论 271 浏览 评分:0.0
容易看懂 [编程入门]有规律的数列求和 摘要:解题思路:注意事项:参考代码:a = int(input())b = 2c = 1d = 0f = 1for i in range(a): e = b/c d += e b += c…… 题解列表 2022年04月09日 0 点赞 0 评论 320 浏览 评分:0.0
定义函数法(有点复杂但思路简单的) 摘要:解题思路:参考代码:n=eval(input()) sum=0 def fengzhi(n): if n ==1: return 2 else: …… 题解列表 2022年04月28日 0 点赞 0 评论 175 浏览 评分:0.0
1018 有规律的数列求和 摘要:解题思路:本题规律有多种,但其实都大同小异我找到的规律是:令a等于分子,b等于分母;后一项分子等于前一项分子加分母,即a = a + b;后一项分母等于后一项分子减前一项分母;即b = a - b;…… 题解列表 2022年05月03日 0 点赞 0 评论 308 浏览 评分:0.0
编写题解 1018: [编程入门]有规律的数列求和 摘要:解题思路:奥妙注意事项:参考代码:#include "stdio.hint main() { int n; float sum=0.0,a=2.0,b=1.0; scanf("%d"…… 题解列表 2022年05月08日 0 点赞 0 评论 171 浏览 评分:0.0