KMXOR - Editorial (Unofficial) (As i know many of you were near to the solution and you r getting wrong answers)

Hello @L_returns could you please point out mistake in my logic

https://www.codechef.com/viewsolution/18617541

https://www.codechef.com/viewsolution/18645512

What is wrong with this solution? Can you please help!

hello @prnjl_rai

your code is giving wrong answer when ‘n’ is odd and k=3.
Add some more cases to it.

So well explained… loved it! :slight_smile:

This explanation is really helpful. This editorial is clearer than the Official one!

link text

can someone help i got all test cases of above correct

PS: sorry I saw the official editorial after I posted this one… Now I think I should let it be as maybe someone can get a help…

1 Like

Its my first attempt for writing editorial so please forgive me for my english and length of editorial…

1 Like

Thanks, I_returns. I almost solved the question just missed the edge cases! and lost 100 ratings got back to Div B :frowning:

ohh… welcome :slight_smile:

perfect, thanks for pointing out the edge cases. Finally got AC.

welcome :slight_smile:

for "5 8 " you forgot to print two one’s …

okay sure… give me some minutes…

Your logic is correct… got AC after some typecasting…

just type cast the output of pow(x,y) function to (ll) and that’s it…

ya sure… wait…

Your logic is also correct typecast problem…

here is your accepted soln

here is your accepted soln… didn’t knew what was float(x)…