Let's say you pay a small fee, e.g. £5, to enter a competition where you have to answer a maths question. If you answer correctly, your name is put in to a hat and randomly someone is picked to win a prize, e.g. a car. To excess money is given to a charity (e.g., feeding the homeless), if it exceeds the cost of the car. Is this haram or not?