Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
37303 zhouhuanyu 玙静 求1+2+3+... C++ 通过 1 MS 240 KB 188 2024-01-20 09:33:36

Tests(1/1):


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


测评信息: