COOKGAME-GETTING WA

my code:CodeChef: Practical coding for everyone

problem link:COOKGAME Problem - CodeChef
please help me fix the error

1 Like

Your logic seems pretty much correct to me. Can you try changing all variables in the “pow” function to long long int? I suspect that its an overflow error happening here. Get back to me with results ^^

1 Like

yes it worked…Thanks… :slight_smile:

Glad it worked. I saw you tried alot for that problem :slight_smile: