Lets take 100 g compound.
It will have
K - 31.9 g
Cl - 28.9 g
O - 39.2 g
M(K) = 39.1 g/mol
M(Cl) = 35.5 g/mol
M(O) = 16.0 g/mol
K - 31.9 g*1/mol/39.1 g ≈ 0.816 mol
Cl - 28.9 g*1 mol/35.5 g ≈ 0.814 mol
O - 39.2 g*1mol/16.0 g ≈ 2.45 mol
K : Cl : O = 0.816 : 0.814 : 2.45
K : Cl : O = 1 : 1 : 3
KClO3 - potassium chlorate (Berthelot's salt)