| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148789 | 杨润东 | 12序列的第n项 | C++ | Accepted | 1 MS | 272 KB | 265 | 2026-02-28 19:46:50 |
#include <iostream> using namespace std; int main() { int n; cin >> n; long long result; if (n <= 2) { result = 1; } else { result = 1 + (long long)(n-2) * (n-1) / 2; } cout << result << endl; return 0; }