• + 0 comments

    python 3: not solve from test 6 bc exceed time.

            # Write your code here
            appe_list = []
            for i in range(r2-r1+1):
                for j in range(c2-c1+1):
                    appe_list.append(gcd(a[r1+i],b[c1+j]))
            print(len(set(appe_list)))