Code not working


The code workds when i provide my input but is not passing the test case.

@amanb25
base cases will be
if n==0 return 1
if n<0 return 0

Also use long long int

@amanb25
your code will pass after doing these corrections.
If you still face any issue then you can ask me here. otherwise please mark this doubt as resolved.

Even after changing the code it works on my ide but is not getting accepted.

@amanb25
i don’t see any changes i said above,done in your code.
This will be the code after correction. https://ide.codingblocks.com/s/244004