Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
38186 | jiabokai | 求1+2+3+... | C++ | 通过 | 0 MS | 248 KB | 193 | 2024-01-25 15:44:39 |
#include<bits/stdc++.h> using namespace std; int word[26]; int fax(int n){ if(n==0) return 0; else return n+fax(n-1); } int main() { int n; cin >>n; cout<<fax(n); return 0; }