This is a programming task. It lays out a problem which Rosetta Code users are encouraged to find solutions to using languages they know.

Each solution should be tested, and should include mention of compiler or interpreter and language version used. If the code is specific to a platform, the platform in question should be included as well.