part2 (709B)
1--- Part Two --- 2 3An Elf just remembered one more important detail: the two adjacent matching digits [1m[97mare not part of a 4larger group of matching digits[0m. 5 6Given this additional criterion, but still ignoring the range rule, the following are now true: 7 8 9 - 112233 meets these criteria because the digits never decrease and all repeated digits are exactly 10two digits long. 11 12 - 123[1m[97m444[0m no longer meets the criteria (the repeated 44 is part of a larger group of 444). 13 14 - 111122 meets the criteria (even though 1 is repeated more than twice, it still contains a double 1522). 16 17 18[1m[97mHow many different passwords[0m within the range given in your puzzle input meet all of the criteria? 19 20