after fourth season Sherlock Moriary realize foolishness battle decide continue competition peaceful game Credit CardsRules game simple player bring favourite ndigit credit card then player digits write card if digit equal player digit small get flick knock forehead usually forefing player for example n3 Sherlocks card 123 Moriartys card number 321 Sherlock name 1 Moriarty name 3 sherlock get flick then digit 2 get flick Finally Sherlock name 3 Moriarty name 1 get flickOf course Sherlock play honestly name digit order give Moriary true villain plan cheat he go digits order going change overall number occurence digit for example case Moriarty 1 2 3 flick 2 3 1 sherlock flicksYour goal find minimum possible number flick Moriarty like flick maximum possible number flick Sherlock Moriarty Note goal different optimal result obtain different strategy