Update: Rename folder name to XSMOJ

This commit is contained in:
2025-02-14 02:44:20 +00:00
parent 394e431a4a
commit c8863a5850
243 changed files with 11 additions and 39 deletions

33
XSMOJ/求1~n的和.cpp Normal file
View File

@ -0,0 +1,33 @@
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <cstdio>
#include <stack>
#include <ctime>
#include <cmath>
#include <queue>
typedef long long l;
typedef double d;
typedef char c;
int n;
using namespace std;
long long wjh(int a){
if(a==n){
return n;
}
else{
return wjh(a+1)*a;
}
}
int main(){
cin >>n;
if(n==0){
cout <<1;
return 0;
}
else{
cout <<wjh(1);
}
return 0;
}