Added C, Java, Python problem 2 solutions