Context. New space telescopes, such as the upcoming PLATO mission, aim to detect and study thousands of exoplanets, especially terrestrial planets around main-sequence stars. This motivates us to study how these planets formed. How multiple close-in super-Earths form around stars with masses lower than that of the Sun is still an open issue. Several recent modeling studies have focused on planet formation around M-dwarf stars, but so far no studies have focused specifically on K dwarfs, which are of particular interest in the search for extraterrestrial life. Aims. We aim to reproduce the currently known population of close-in super-Earths observed around K-dwarf stars and their system characteristics. Additionally, we investigate whether the planetary systems that we form allow us to decide which initial conditions are the most favorable. Methods. We performed 48 high-resolution N-body simulations of planet formation via planetesimal accretion using the existing GENGA software running on GPUs. In the simulations we varied the initial protoplanetary disk mass and the solid and gas surface density profiles. Each simulation began with 12 000 bodies with radii of between 200 and 2000 km around two different stars, with masses of 0.6 and 0.8 M⊙. Most simulations ran for 20 Myr, with several simulations extended to 40 or 100 Myr. Results. The mass distributions for the planets with masses between 2 and 12 M⊕ show a strong preference for planets with masses Mp < 6 M⊕ and a lesser preference for planets with larger masses, whereas the mass distribution for the observed sample increases almost linearly. However, we managed to reproduce the main characteristics and architectures of the known planetary systems and produce mostly long-term angular-momentum-deficit-stable, nonresonant systems, but we require an initial disk mass of 15 M⊕ or higher and a gas surface density value at 1 AU of 1500 g cm−2 or higher. Our simulations also produce many low-mass planets with M < 2 M⊕, which are not yet found in the observed population, probably due to the observational biases. Earth-mass planets form quickly (usually within a few million years), mostly before the gas disk dispersal. The final systems contain only a small number of planets with masses Mp > 10 M⊕, which could possibly accrete substantial amounts of gas, and these formed after the gas had mostly dissipated. Conclusions. We mostly manage to reproduce observed K-dwarf exoplanetary systems from our GPU simulations.