mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 1449.cpp
This commit is contained in:
parent
f14091a0ff
commit
79c75b2f4d
28
QUSTOJ/1449.cpp
Normal file
28
QUSTOJ/1449.cpp
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
int func(int n)
|
||||||
|
{
|
||||||
|
switch(n)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
return 0;
|
||||||
|
case 2:
|
||||||
|
return 1;
|
||||||
|
case 3:
|
||||||
|
return 2;
|
||||||
|
case 4:
|
||||||
|
return 9;
|
||||||
|
case 5:
|
||||||
|
return 44;
|
||||||
|
default:
|
||||||
|
return (n-1)*(func(n-1)*func(n-2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
int inc;
|
||||||
|
while(scanf("%d",&inc)==1)
|
||||||
|
{
|
||||||
|
printf("%d\n",func(inc));
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user