It will depend on a lot of factors.
Typically, otherwise-identical flats near the top, will be hotter than those near the bottom, for two reasons:
1) heat rises - so heat will rise from lower flats to upper flats. More accurately, the density of air decreases as temperature rises, so hotter air will tend to rise up through buildings, where convection is possible.
2) overshading is likely to be less, higher up: in summer, most of the heat in a typical flat will come from solar gain (rather than, say, from internal gains from cooking, people, appliances). The more that windows are overshaded, the lower this solar gain is. Flats low down will have their windows overshaded by neighbouring buildings, trees, and so on. Flats higher up will see more sky from their windows; so will have higher solar gain.
Much of the stuff above, particularly about heat rising, but also about solar gain, still applies in winter: although heating systems may now be the single largest source of heat, solar gains can still be relevant, if there are large south-facing windows.
Obviously, there's little or no solar gain - there may be some small windows at the footway ground level, but not much. However, as @anna-v says, there is the moderating effect of the ground itself, which acts as a large thermal store. This large thermal mass will act as a seasonal buffer, heating very slowly through spring and summer, and cooling slowly through autumn and winter, thus typically moderating both the hottest summer temperatures and the coldest winter temperatures.
There are software packages, such as Energyplus, and PHPP that can model solar gain and the effects of thermal mass, at any time of year, for any location; but note that will need a lot of input parameters to do a decent job of it.