Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
12393 | hu | 递归求阶乘 | C++ | Time Limit Exceeded | 1000 MS | 248 KB | 188 | 2023-03-24 17:43:34 |
#include <iostream> using namespace std; int v(int n){ if(n==1){ return 1; }else{ return n*v(n-1); } } int main(){ int n; cin >> n; cout << v(n); return 0; }