import collections def func(str): while len(str) >= 2: yield str[0:2] str = str[1:] str = "" for _ in range(18): temp = input() temp.rstrip('\n') str += temp print(len(str)) ls = [x for x in func(str)] print(len(ls)) c = collections.Counter(ls) print(len(c)) print(c) print(c.most_common(5))
14159265358979323846264338327950288419716939937510 58209749445923078164062862089986280348253421170679 82148086513282306647093844609550582231725359408128 48111745028410270193852110555964462294895493038196 44288109756659334461284756482337867831652712019091 45648566923460348610454326648213393607260249141273 72458700660631558817488152092096282925409171536436 78925903600113305305488204665213841469519415116094 33057270365759591953092186117381932611793105118548 07446237996274956735188575272489122793818301194912 98336733624406566430860213949463952247371907021798 60943702770539217176293176752384674818467669405132 00056812714526356082778577134275778960917363717872 14684409012249534301465495853710507922796892589235 42019956112129021960864034418159813629774771309960 51870721134999999837297804995105973173281609631859 50244594553469083026425223082533446850352619311881 71010003137838752886587533208381420617177669147303
900 899 100 Counter({'17': 17, '81': 16, '46': 15, '09': 15, '30': 14, '60': 14, '93': 13, '27': 13, '95': 13, '05': 13, '48': 13, '21': 13, '11': 13, '59': 12, '53': 12, '64': 12, '19': 12, '71': 12, '92': 11, '38': 11, '62': 11, '28': 11, '99': 11, '82': 11, '94': 11, '44': 11, '34': 11, '13': 11, '52': 11, '14': 10, '23': 10, '84': 10, '33': 10, '02': 10, '37': 10, '10': 10, '20': 10, '49': 10, '86': 10, '12': 10, '65': 9, '79': 9, '75': 9, '51': 9, '78': 9, '08': 9, '03': 9, '70': 9, '66': 9, '31': 9, '96': 9, '56': 9, '36': 9, '73': 9, '18': 9, '26': 8, '58': 8, '89': 8, '32': 8, '83': 8, '88': 8, '45': 8, '67': 8, '72': 8, '01': 8, '85': 8, '91': 8, '41': 7, '97': 7, '43': 7, '74': 7, '40': 7, '06': 7, '25': 7, '22': 7, '29': 7, '54': 7, '61': 7, '24': 7, '77': 7, '15': 6, '35': 6, '50': 6, '69': 6, '07': 6, '98': 6, '42': 6, '90': 6, '00': 6, '16': 5, '39': 5, '47': 5, '55': 5, '87': 5, '63': 5, '57': 5, '80': 4, '76': 4, '68': 4, '04': 3}) [('17', 17), ('81', 16), ('46', 15), ('09', 15), ('30', 14)]