So you win the Lottery but you’re only allowed to spend your winnings on sweets. You can buy the finest sweets in the land (eg. King-sized Mars bar, airport Tolberones). However everybody would know about your win, you’d become a minor celebrity and have to put up with Willy Wonka/Bertie Bassett jokes. Your dentist would also make your life hell.
Answered a firm and strong No without hesitation, would reconsider if a) you could tangibly build a house from sweets or b) there’s any type of sweet that has enough nutritional value to be able to aid starvation and food poverty. Like could you sustain an impoverished malnourished population if you only could provide Snickers/Bounty/(insert vaguely nutritional/high protein type of sweet)
but otherwise winning the lottery with the condition of only being able to buy sweets sounds worse that water torture