The influence of the Zeeman energy and the Landau levels (LLs) arising from an applied magnetic field B upon the critical temperature Tc is studied using a fully quantum mechanical method within the framework of the Bardeen-Cooper-Schrieffer (BCS) theory of superconductivity that forms from an ultraclean metal. As in semiclassical treatments, we found that two electrons can form Cooper pairs with opposite spins and momenta in the B direction while either in the same or in neighboring LLs. However, the fully quantum mechanical treatment of the LLs causes Tc(B) for electrons paired on the same LL to oscillate about the critical temperature of the BCS theory, similar to that of the de Haas-van Alphen effect. The Zeeman energy causes Tc(B) to decrease in an oscillatory fashion with increasing B for electrons paired either on the same or on neighboring LLs. For the Zeeman g>1, pairing on neighboring LLs results in the highest Tc(B). For g<1, pairing on the same LLs gives the highest Tc(B). In addition, Tc(B) for electrons paired on neighboring LLs exhibits an apparent symmetry around g=2, as the oscillatory critical temperature behaviors are nearly identical for g=2±δ.