The formation of the massive young stars surrounding SgrA* is still an open question. In this paper, we simulate the infall of a turbulent molecular cloud toward the Galactic Center (GC). We adopt two different cloud masses (4.3 × 104 M sun and 1.3 × 105 M sun). We run five simulations: the gas is assumed to be isothermal in four runs, whereas radiative cooling is included in the fifth run. In all the simulations, the molecular cloud is tidally disrupted, spirals toward the GC, and forms a small, dense, and eccentric disk around SgrA*. With high-resolution simulations, we follow the fragmentation of the gaseous disk. Star candidates form in a ring at ~0.1-0.4 pc from the supermassive black hole and have moderately eccentric orbits (e ~ 0.2-0.4), in good agreement with the observations. The mass function of star candidates is top-heavy only if the local gas temperature is high (gsim 100 K) during the star formation and if the parent cloud is sufficiently massive (gsim 105 M sun). Thus, this study indicates that the infall of a massive molecular cloud is a viable scenario for the formation of massive stars around SgrA*, provided that the gas temperature is kept sufficiently high (gsim 100 K).