Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
85403 卢语涵 求序列的前n项和 C++ Accepted 1 MS 272 KB 230 2024-07-17 14:21:00

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ float a,b=2,c=1,d=0,k=0,i; cin>>a; for(i=1;i<=a;i++){ k=k+b/c; d=b; b=b+c; c=d; } cout<<k; return 0; }