All the 3 above questions are programming challenges of net-force.nl ... your friend must be trying to solve them without taking any pain ;)
Ive solved first 2 questions a long time before .. to solve the 3rd one, one must brute-force the possible set of answers, and I've nt done that. So...