Solved problem #29
Added solution for problem #28.
Merged conflicts in a problem #29. Also fixed a bug in problem #27 (function
returns null instead of calculated value)