摘要: 952. 按公因数计算最大组件大小 题解: 埃氏筛+并查集, 枚举质因子,将拥有相同质因子的数加到同一个集合。 class Solution(object): def largestComponentSize(self, A): """ :type A: List[int] :rtype: int 阅读全文
posted @ 2020-08-14 11:28 樱花庄的龙之介大人 阅读(163) 评论(0) 推荐(0) 编辑