okay thanks
u ll cuz its my first attempt
Happy to help bro
Will reply u on ur comment on my editorial shortly…
alright! will wait. Thankyou.
Well thank me if I solve it
solved… keeping k==1 k==2 and k==3 condition before n==2 helps… (because 2 1 test case failed…)
all above test cases pass …
plz if possible check for once …
I even type-casted pow function value to long long …
https://www.codechef.com/viewsolution/18651992
thnx in advance …
this is the edited one with minor changes …
plz see whats the mistake
i am getting WA …
Okay bro you do have read above answer… that’s nice… let me check…
i have further modified the code …
plz check …
… CodeChef: Practical coding for everyone…
i have got many WA …
…
plz help …
thnx in advance !!!
HERE is my unofficial editorial(I have described whole soln there)
my solution was almost same as this editorial soln…
try this test case and have a look at editorial(unofficial) if u r not missing anything(specially corner cases that I mentioned)…
I m getting right answers in all the test cases mentioned above.Please have a look.
1 1 1 1
1 1 1 1 1
1 2 1 1 1
2 1 1 1 1 1
3 1 1 1 1
2 1 1 1 1 1
1 2 12 1 1
8 7
8 7 1 1
your logic and output seems correct… dk what does codechef found wrong
post queries about what you didn’t understood in editorials… and also you can have a look at my editorial for this question
#HERE
Your editorial is not showing.
Here is the new link
Previous link was not working because old discuss was replaced.
Thanks for good editorial