Here is my code and it is giving right answer on almost every test case I checked.

I’m still not able to find the error.

http://www.codechef.com/viewsolution/6325213

would love anyone who takes time to read this post and help.

Thanks!

# WA on A4, need help!

**h1ashdr_gon**#1

**mediocoder**#2

Your code prints one extra " **0** " in case of power of 10’s

For example test cases :

3

10 2

100 5

1000000000 9

and your output is

10 000

10000 000000

100000000 0000000000

Notice one extra 0 here at the second part of your output ( for last k digits).

Also your code is giving wrong answer for case **8 8**, i.e., ( 8^8 and 8 digits of it).

It outputs result as **16777215 16777216** but it should be **16777216 16777216**.