Partial Correct Solution Need Help

I have Submitte the Solution for Problem

and my Solution is
https://www.codechef.com/viewsolution/27603915
It’s only partially correct i think because in some test cases the long long int will overflow and i have to use an array to store extra integer.Is this the Case or what is wrong?

hey i saw your solution, but do you really need to multiply a and b n/2 times by 2,anyways they will get divide…
so if n is odd ans will be max(b, a 2) /min(b, a 2) and if n is even max(b, a) /min(b, a)

Thank you brother but can you tell me how can you think so minute detail in problem like i just saw the question and then started thinking about the solution and when i got partially correct answer i seen the test cases and thought the error is because of length of output so thought to use array.Thanks anyways.

it’s all about practice man. the more you do the better you will become. Good luck :slight_smile:

1 Like

I have submitted the correct answer thanks.