COJ challengues solved in java