Some dude on the internet said this would take 1000 lines of code to make. I did it in like 30.
This program runs the problem a bunch of times and prints the results to the console.
Click to download the runnable jar file - run it in cmd to see results