Dividing array problem


why this is not passin??

Use long long int and scanf in your code .

Rest logic is correct??


why after adding fast input output it is giving tle???

Yes the logic is fine

1 Like

Because it’s slow. That’s why I said use scanf and printf, its better.

So what is the benefit of fast input output if we have to use scanf and printf??

It’s easier to take input that way, works in most of the cases, You don’t have to mention type of variable and improves the readability.

So it works most of the time but why not working here??

Lets say it solves a task in time t1, and time limit is t and t1>t so it fails here. But in most tasks time limit is usually t2 where t2>t1, so it passes in those cases.

ohk thanks bhaiya…

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.