Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
133104 向俊麒 13分数求和 C++ Wrong Answer 1 MS 272 KB 503 2025-10-14 19:30:50

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,i; double fm=1,fz=2,fm0=2,fz0=1,s=2; cin>>n; s+=fz/fm; for(i=2;i<=n;i++){ fz0+=fm; fm0+=fz; s+=fz/fm; fz+=fm0; fm=fz0; } s=s-1.5; printf("%.4lf",s); return 0; }


Run Info:

------Input------
8
------Answer-----
13.2437
------Your output-----
44.4062