Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
115441 | 谢佳辰 | 求序列的前n项和 | Python3 | Compile Error | 0 MS | 0 KB | 229 | 2025-03-30 14:26:15 |
#include <bits/stdc++.h> using namespace std; int main(){ double a=2,sum=0,b=1,n,i,c; cin>>n; for(i=1;i<=n;i++){ sum=sum+a/b; c=a; a=a+b; b=c; } cout<<sum<<endl; }
File "Main.py", line 2 using namespace std; ^ SyntaxError: invalid syntax