Earlier quoted context omitted.
This is one of my favourite problems, I still remember that it has a very real edge case even though I solved it more than 10 years ago. Thank you for the problem!
Can you reuse a plate with 500?
Project Euler
81–90 of 142 posts
Re: Project Euler
#82this is how you end up getting into APL/array langs for sure.
Re: Project Euler
#83Re: Project Euler
#84I love running euler problems when trying to learn the basics of a new programming language. I have a small collection of programs in like 10 different languages that I keep around as a reference for things because I always try to use language-specific features to solve the problems, and then I reference them as examples.
Wow. You reminded me of a computer engineering class years ago where we wrote assemblers and emulators for a simple architecture. I tested mine by writing a solution for one of the first Project Euler questions!
Re: Project Euler
#85I solved a few using AWK, fun: https://github.com/ketancmaheshwari/projecteuler
Re: Project Euler
#86I wrote Problem 371, https://projecteuler.net/problem=371 , as a high school student in 2012! I'm so happy to have spent twenty years of my life learning math and solving problems on Project Euler and elsewhere.
That means one of the total sum of possible car plates is 26^3.
Since we want to find pairs (x, y) that x + y = 1000. That means the total sum would also add up sum([1 for x in range(1000) for y in range(1000) if x + y == 1000])/2 since there is a symmetry.
But wait, find the expected number of plates he needs to see for a win. So maybe we need to borrow something from statistics (Possion/chi-squared distribution) or queueing theory...?
Edit: ah I saw the solution, it is a Markov chain.
Re: Project Euler
#87I wrote Problem 371, https://projecteuler.net/problem=371 , as a high school student in 2012! I'm so happy to have spent twenty years of my life learning math and solving problems on Project Euler and elsewhere.
That sounds like a combinatorial problem...alphabets from AAA to ZZZ, numbers from 000 to 999. That means one of the total sum of possible car plates is 26^3. Since we want to find pairs (x, y) that x + y = 1000. That means the total sum would also add up sum([1 for x in range(1000) for y in range(1000) if x + y == 1000])/2 since there is a symmetry. But wait, find the expected number of plates he needs to see for a…
Re: Project Euler
#88403 Forbidden Request forbidden by administrative rules.
Note: I didn't know and open this website until now.
Re: Project Euler
#89I loved to solve it and then look through all the different solutions and find pretty ideas and idioms.
Re: Project Euler
#90I wrote Problem 371, https://projecteuler.net/problem=371 , as a high school student in 2012! I'm so happy to have spent twenty years of my life learning math and solving problems on Project Euler and elsewhere.
This is one of my favourite problems, I still remember that it has a very real edge case even though I solved it more than 10 years ago. Thank you for the problem!