int climbStairs(int n)

{

int a,s=0,i=0;

long jiec(int);

while(i<=n/2)

{

a=jiec(n-i)/jiec(i)/jiec(n-2*i);

s=s+a;

i++;

}

return s;

}

long jiec(int k)

{

long s=1;

for(int i=k;k>0;k--)

s=s*k;

return s;

```
long long s;
if(k<=1)s=1;
else
s=k*jiec(k-1);
return s;
```

}

It is right when n<20,but wrong when n is big.for example when n=35.

I have just learn c for a short ,who can help me to solve this problem.thanks!!!