The energy levels of the first few low-lying states of helium and lithium atoms in intense magnetic fields up to ≈108-109 T are calculated in this study. A pseudospectral method is employed for the computational procedure. The methodology involves computing the eigenvalues and eigenvectors of the generalized two-dimensional Hartree-Fock partial differential equations for these two- and three-electron systems in a self-consistent manner. The method exploits the natural symmetries of the problem without assumptions of any basis functions for expressing the wave functions of the electrons or the commonly employed adiabatic approximation. It is found that the results obtained here for a few of the most tightly bound states of each of the atoms, helium and lithium, are in good agreement with findings elsewhere. In this regard, we report data for two states of lithium that were lacking thus far. It is also seen that the pseudospectral method employed here is considerably more economical, from a computational point of view, than previously employed methods such as a finite-element-based approach. The key enabling advantage of the method described here is the short computational times, which are on the order of seconds for obtaining accurate results for heliumlike systems.