4 ms·
#240 is pretty evil. I spent a lot of time trying thing that I thought would work, but didn't. Well done creating it.
by zck 17y ago
#240 is pretty evil. I spent a lot of time trying thing that I thought would work, but didn't. Well done creating it.
- btilly 17y agoThat was actually the problem that first got me interested in math. The whole "roll several dice, take the top n" was a common trick we used in D&D games, and I wanted to know what the odds were of getting different outcomes, and how it varied by number of dice. I actually worked out the 4 dice version by hand before trying to get smarter about it. And eventually did. So when I saw Project Euler I dusted off the problem, and tried to set up a variant that was about the right level of difficulty for a Project Euler problem. :-)
- jacobolus 17y agoA really tricky dice problem is calculating Risk odds, once an attack needs to go through several countries, potentially from multiple starting points. The whole distribution of possible outcomes must be considered, to best figure out the trade-offs in attacking. :-)
- jacobolus 17y agoWhy can’t you just figure out how many ways to sum 10 12-sided dice to 70, and then for each solution, multiply that by the number of ways the other dice could all be ≤ the smallest one (times changes in ordering). Seems like it'd take no more than 20 or 30 minutes to code up.
- huherto 17y agoGo ahead and try it out. I've only solved 87 problems, but I enjoyed it very much. My experience was that many problems were very deceptive. At first you think, it is really easy, and after awhile it becomes evident that the problem is much harder than initially thought. I appreciated that every problem seems to teach you something new, even if the problem seems very similar to a previous one, there is usually a twist.
- btilly 17y agoGive it a shot. But if it goes wrong remember that there may be more solutions than you think and ordering might be trickier than you think.