It is coprime with node 1 gcd32 1 so node 1 is its closest valid ancestorExample 2Input nums 561023615 edges 010213142526 Output 1010001 Constraintsnumslength n1 numsi 501 n

Showing the single result

Showing the single result