Ratios of cross sections, sigma(Z + c jets)/sigma(Z + jets), sigma(Z + b jets)/sigma(Z + jets), and sigma(Z + c jets)/sigma(Z + b jets) in the associated production of a Z boson with at least one charm or bottom quark jet are measured in proton-proton collisions at root s = 13 TeV. The data sample, collected by the CMS experiment at the CERN LHC, corresponds to an integrated luminosity of 35.9 fb(-1), with a fiducial volume of p(T) > 30 GeV and vertical bar eta vertical bar < 2.4 for the jets, where p(T) and eta represent transverse momentum and pseudorapidity, respectively. The Z boson candidates come from leptonic decays into electrons or muons with p(r) > 25 GeV and vertical bar eta vertical bar < 2.4, and the dilepton mass satisfies 71 < m(z) < 111 GeV. The measured values are sigma(Z + c jets)/sigma(Z + jets) = 0.102 +/- 0.002 +/- 0.009, sigma(Z + b jets)/6(Z + jets) = 0.0633 +/- 0.0004 +/- 0.0015, and sigma(Z + c jets)/sigma(Z + b jets) = 1.62 +/- 0.03 +/- 0.15. Results on the inclusive and differential cross section ratios as functions of jet and Z boson transverse momentum are compared with predictions from leading and next-to-leading order perturbative quantum chromodynamics calculations. These arc the first measurements of the cross section ratios at 13 TeV.