Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I should have realized this meant don't write a prime sieve, thank you though.
Edit: yep, removed the wheel sieve and I passed in 1582ms or so
I spent an embarassingly long time on this fiddling with iterator chains and blaming the lack of Rust compiler optimisations, before I realised I didn't need a whole prime sieve and brute force (with the obvious pruning) is more than fast enough.
FWIW, this wording probably doesn't help. I wouldn't expect most folks at this level to be familiar with terminology around multisets. The sample data definitely doesn't help in that regard.
This is a bad suggestion as this question is aimed at functional programming with algebraic datatypes. In Rust the actual return types for this function are Result::Ok(u32) and Result::Err(String). Result is a useful monoid that makes error handling super simple when you combine it with pattern matching.