Yes, the same here! My solution is 100500 times longer than this and for me it seems impressive too! 🤯
Though I am kinda beginner in Python, maybe this is the reason 🤷♂️
Interesting. I didn't think of saving the entire list of primes once for every test.
Unfortunate, this solution always times out for me..
Agreed. This ambiguity had me scratching my head for a while.
I certainly can't say I understand what this code is doing, it's too opaque for me - I'm just impressed that this few lines of code can solve the problem when I wrote far too many!
not to my taste ;p
Efficient enough to make it into the solutions list is efficient enough though, ain't it? :)
nope: it's short, but inefficient like hell... x) (and runs only in python 2.7)
Comments, or just a leading comment explaining the process, would be very useful - great solution.
What an amazing series, needed to add extra optimizations between the 4x4, 6x6, and 7x7 - the latter was a pig. I'm sure there's a lot more code in my solution that is merited, I'll likely revisit at some point and see just how little I can get away with.
Well, that was a challenge and a half. I fear I overthought and overengineered it, and some obvious optimizations were not-so-obvious 'til late in the day - onwards and upwards to 7x7 Skyscrapers... :D
I've amended - the chance of collision was around 2-in-a-million, but yes, it would have likely shown up at some point (and could've confused the poor dev that hit it!).
Hi, I've added in some code to randomize the IDs of the employees, whilst there's a small chance of a collision, I don't know that it's worth worrying about.
I've changed employees_total to be an INT, totally agree that half an employee is no use to anyone. :)
Age is age-as-of-2016-04-01 as I understood it when completing the kata.
Have changed to INT.