Solve problems 13,27,35,37,50,123 using Java.