The solution of first four problems of project euler