In Pokémon X and Y, the lottery (named the Loto-ID) is at the Loto-ID Center on Estival Avenue in Lumiose City, where it is conducted by the front receptionist. The winning ID number changes daily, and the game looks for matches by examining the IDs of all Pokémon in the player's party and in all PC Boxes (but not Pokémon in the Day Care). Although the number remains the same throughout the day, the player may check for matches multiple times in one day until they win a prize, after which they may not participate again for the rest of the day.
Source