Sponsored
Use these hints if you're stuck. Try solving on your own first.
The greatest common divisor must be a prefix of each string, so we can try all prefixes.
Solve with full IDE support and test cases