Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
68432 | sh25_ganzy | 【基础题】求和(7) | C++ | 编译错误 | 0 MS | 0 KB | 289 | 2025-10-02 12:57:31 |
#include<bits/stdc++.h> using namespace std; int a(int i){ int r=1 for(int j=1;j<=i;j++){ r*=j; } return r; } int main(){ double s; for(int k=1;k<=10;k++){ s+=1.0/(0.0+a(k)); } cout<<fixed<<setprecision(5)<<s; return 0; }