For the the quintic quasitopological action which has no well-defined variational principle, we introduced a surface term that for a spacetime with flat boundaries make the action well-defined. Moreover, we investigated the numerical solutions of the above-mentioned gravity coupled to the nonlinear logarithmic and exponential electrodynamics. It has no horizon and curvature except one conical singularity at r=0 with a deficit angle delta phi . Also we found the counterterm which removes non-logarithmic divergences for the static quintic quasitopological gravity. Using this counterterm one can calculate a finite action and conserved quantities for the quintic quasitopological gravity.