Count Nice Pairs Leetcode Python Easy