the spaghettified world

soon to be obsolete thoughts & feelings as we hurtle through the event horizon

wheelwright

When selecting lottery tickets, it’s possible to select a ‘wheel’ that selects Y tickets that guarantees they will match at least X numbers from the result. I’m not sure of the maths here, can you write me a program that given the rules for the lottery (e.g. choose 6 numbers from 1-49) and X, will tell you how many tickets Y you need, and allow you to generate an example.

an hour and a half later

wheelwright