As no cell is connected to the capacitor so the charge (Q) remains constant.
If the capacitance of capacitor before inserting the dielectric is C then capacitance after inserting dielectric becomes KC
Before inserting dielectric the energy is U=Q22C
After inserting dielectric the energy is U′=Q22KC=UK−1