fork download
  1. # http://c...content-available-to-author-only...e.com/questions/49747/identify-card-half/49770#49770
  2.  
  3. #' _________\n| |\n| H H |\n| H H H |\n---H---H---'
  4. #import re
  5. #r=re.findall('[C-S]',(input()*2)[:-9])
  6. #print r[0]+`len(r)`
  7.  
  8. s=(input()*2)[:-9]
  9. for c in"CDHS":
  10. if c in s:print c+`s.count(c)`
Success #stdin #stdout 0.01s 7696KB
stdin
' _________\n|         |\n|  H   H  |\n|  H H H  |\n---H---H---'
stdout
H12