A Factorial Problem

https://ide.codingblocks.com/s/289818
why This code is getting a TLE?

@deepna you can refer to this

@deepna why have you put the line if k >= 4?

i have removed it. It is still giving a TLE.

@deepna there are some minor errors in your code, please see the code I have provided it uses exactly the same logic

it is giving tle for your code also

@deepna I tried for my code, it is passing all test cases.

I tired your code yes its working right.But I still can’t figure out what i did wrong can you please point out.

@deepna there are small differences, just place the codes side by side and read them line by line you will get it!

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

What is wrong in this code??