Deutsch–Jozsa problem ( \(DJ_{n}\) ) showed for the first time that quantum computation can achieve exponential advantages over classical computers, which encouraged and laid the foundation for further research on quantum algorithms. A generalization of Deutsch–Jozsa problem ( \(DJ^{k}_{n}\) , proposed by Phys Rev A 97:062331, 2018) maintains the exponential advantage when the parameter k is a constant. However, these achieved exponential advantages are just in the case that all outputs are required to be accurate. In contrast, this paper studies classical randomized decision tree complexities of \(DJ_{n}\) and \(DJ^{k}_{n}\) . It is proved that the first complexity \(R_{2}(DJ_{n})\le 3\) in all cases and the second complexity \(R_{2}(DJ^{k}_{n})\) is constant when \(\frac{k}{n}\) is constant for n being a large even number. As a result, for these cases, optimal bounded-error quantum algorithms of \(DJ_{n}\) and \(DJ^{k}_{n}\) can only slightly accelerate the classical computation.