| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149170 | 马俊潇 | 13求1+2-3+4-5+……n的值 | C++ | Wrong Answer | 0 MS | 272 KB | 149 | 2026-03-07 16:00:31 |
#include<iostream> using namespace std; int main(){ int n,a=0; cin>>n; for(int i=4;i<=n;i++){ a=a-i; } cout<<a; return 0;}
------Input------
157
------Answer-----
-77
------Your output-----
-12397