The purpose of this code challenge is to demonstrate problem solving and code quality.
Any language can be used to solve the problem and any libraries may be used except any Poker related libraries.
In 5-card draw poker, a player is dealt a hand of five cards (which may be looked at). The player may then discard between zero and five of his or her cards and have them replaced by the same number of cards from the top of the deck (which is face down). The object is to maximize the value of the final hand. For the different values of hands in poker see the References.