Trouble with passing the 4th test case

I cant seem to figure out whats wrong with my code.
no matter what i do i keep getting a wrong answer with the 4th test case.

Tried unlocking the test case input and answer,tested the same input with my code and couldnt find any difference with the exoected output and mine.

Any help would be much appreciated.

Hello @mgeorge00747,

Please, share your code with me.
STEPS:

  1. Paste it at https://ide.codingblocks.com/
  2. Save it there.
  3. Share the URL generated.

Hello @S18ML0016,

As the constraints of the question says:
N <= 10^9
So, doing the product of suck a big number will result in a value greater than the range of int.
Solution:
Make every variable of type long long

Hope, this would help.
Give a like if you are satisfied.

I had tried that earlier ,still results in the same issue.
the fourth test fails.

Hello @mgeorge00747,

Also, you have missed the case when N<2
I have corrected your code:

Hope, this would help.

Im still failing test case 4,
i looked at the case input and even tried applying the same input and i got the expected output,cant seem to figure out why it keeps failing me after i submit though

@mgeorge00747
For input 1 output should be -1
Your code is printing 0 and 1

Please close the doubt if your query is resolved

Hello @mgeorge00747,

This is because in the code i have shared with you, I forget to comment the statement:
// if(N<=0)