Poker Hand
This commit is contained in:
1 parent
a6aaee5504
commit
683c8bf233
1 file changed
+10
@@ -0,0 +1,10 @@
|
||||
cards = input().split()
|
||||
ranks = [c[0] for c in cards]
|
||||
sranks = set(ranks)
|
||||
strength = [0, None]
|
||||
for sr in sranks:
|
||||
s = ranks.count(sr)
|
||||
if s > strength[0]:
|
||||
strength[0] = s
|
||||
strength[1] = sr
|
||||
print(strength[0])
|
||||
Reference in new issue
Block a user