| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 78646 | 刘珩宇 | 13求1+2-3+4-5+……n的值 | Python3 | Compile Error | 0 MS | 0 KB | 202 | 2024-06-23 14:44:42 |
#include<iostream> using namespace std; int main() { int s=1,n,i; cin>>n; for(i=2;i<=n;i+=1){ if(i%2==0){ s+=i; } else{ s-=i; } } cout<<s; return 0; }
File "Main.py", line 2
using namespace std;
^
SyntaxError: invalid syntax