Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
11788 蒋瀚辉 函数求阶乘 C++ Accepted 1 MS 728 KB 215 2021-05-17 18:11:43

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; void dg(int j,int s,int n) { if(s<=n+1) cout << j << " "; else return; dg(j*s,s+1,n); } int main() { int n; cin >> n; dg(1,2,n); return 0; }