In a certain card game, one of the hands dealt contains:
- Exactly thirteen cards.
- At least one card in each suit.
- A different number of cards in each suit.
- A total of five hearts and diamonds.
- A total of six hearts and spades.
- Exactly two cards in the "trump" suit.
Which one of the four suits -- hearts, spades, diamonds, or clubs -- is the "trump" suit?
for h in range(1,7):
hdsc = set([h, 5-h, 6-h, h+2])
if len(hdsc) == 4 and 2 in hdsc:
print 'H: %d D: %d S: %d C: %d' % (h, 5-h, 6-h, h+2)
This produces the answer
H: 4 D: 1 S: 2 C: 6
So Spades is the trump suit.
Edited on March 4, 2014, 11:08 am
Posted by tomarken
on 2014-03-04 10:56:28