Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
83117 sh25_shengmy 求1+2+3+... C++ 通过 0 MS 244 KB 188 2026-01-22 20:19:07

Tests(1/1):


#include<iostream> using namespace std; int sum(int n){ if(n==1) return 1; else return n+sum(n-1); } int main(){ int n; cin>>n; cout<<sum(n); return 0; }


测评信息: