I can honestly say I would've failed to answer that correctly. Getting that n is 10 is easy enough but after that...yeah, I'd have no chance.
Happily, I've never had a need to do anything like it in the 'real' world, so I think I can accept my failure on this one.