Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
111796 陈家渝 13求1+2-3+4-5+……n的值 C++ Wrong Answer 0 MS 276 KB 356 2025-03-05 20:15:51

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 s=0,n,i,m; cin>>n>>m; for(i=1;i<=n;i++) s+=i; cout<<s; return 0; }


Run Info:

------Input------
157
------Answer-----
-77
------Your output-----
12403