Note: For problem M, The editorial is saying that answer is -1 iff n is of form of p^i, Please read it as n is of form of p^i or 2 * p^i.
I have lost the tex file, So I am really sorry, Next time I will try to write editorials in a doc kind of format.UPDATE1 : Problems have been added to SPOJ and to our Online judge also. http://www2.cse.iitk.ac.in/judge/public/ . So Enjoy solving them :)
http://www.spoj.com/problems/IITKWPCA/
See the problem from A to J, L to O.
UPDATE2: I have corrected the errors in the editorial and uploaded the latest file. If you want some more explantion.I will edit the article, just write a comment about which problem do you think that editorial can be improved and what you do not understand from the editorial.
https://docs.google.com/file/d/0B8cc7eHcqRVNaHNWRjl0T01vX1U/edit?usp=sharing