The answer is the earth. It takes 24 hours to rotate around the sun. WHile it takes 365 or 366 days (depending if leap year) to roate around the sun.The Sidereal Period of Rotation vs. the Synodic Period of Rotation
As a planet rotates around its axis, the stars appear to move around a projection of the planet's axis into space. The time required for the stars to move once around their paths is called the sidereal period of rotation, or the rotation period of the planet.
While the planet rotates, it is also moving around the Sun. This changes the apparent position of the Sun among the stars, and as a result, it does not move around the sky in quite the same period of time that the stars do. Depending upon whether the rotation of the planet is direct (in the same direction as its orbital motion) or retrograde (in the opposite direction as its orbital motion), the time that the Sun takes to go once around the sky, which is called the synodic period of rotation, or the length of the day, may be longer or shorter than the sidereal period of rotation. Table 1 shows the rotation period and the length of the day for the Moon, and the planets. As you can see, for most of the bodies, the two times are very similar, but for objects which have slow rotation periods, such as the Moon, Mercury and Venus, there is a large difference between the two time periods.