The purpose of the present study is to present a new approach to designing and selecting the details of multidimensional continuous RC beam by applying all strength, serviceability, ductility and other constraints based on ACI318-14 using Teaching Learning Based Optimization (TLBO) algorithm. The optimum reinforcement detailing of longitudinal bars is done in two steps. in the first stage, only the dimensions of the beam in each span are considered as the variables of the optimization algorithm. in the second stage, the optimal design of the longitudinal bars of the beam is made according to the first step inputs. In the optimum shear reinforcement, using gradient-based methods, the most optimal possible mode is selected based on the existing assumptions. The objective function in this study is a cost function that includes the cost of concrete, formwork and reinforcing steel bars. The steel used in the objective function is the sum of longitudinal and shear bars. The use of a catalog list consisting of all existing patterns of longitudinal bars based on the minimum rules of the regulation in the second stage, leads to a sharp reduction in the volume of calculations and the achievement of the best solution. Three example with varying degrees of complexity, have been selected in order to investigate the optimal design of the longitudinal and shear reinforcement of continuous beam.