Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
107844 李朋秦 12序列的第n项 C++ Accepted 1 MS 272 KB 175 2025-01-18 14:55:50

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n,s,m; cin>>n; m=1; s=0; for(int i=1;i<=n-1;i++){ m=m+s; s=s+1; } cout<<m; return 0; }