📌  相关文章
📜  python中两组解决方案之间的hackerrank - TypeScript代码示例

📅  最后修改于: 2022-03-11 14:48:29.840000             🧑  作者: Mango

代码示例1
# Complete the 'getTotalX' function below.

def getTotalX(a, b):
    maxA = max(a)
    minB = min(b)
    count = 0
    for num in range(maxA, minB + 1):
        left = all([num % numA == 0 for numA in a])
        right = all([numB % num == 0 for numB in b])
        count += left * right
    return count