Option (B) is correct.
Explanation:
The rightmost entry of common-divisors is the gcd, so gcd(90,n)=30, and the list must be exactly the common divisors.
For n=120: divisors(90)=[1,2,3,5,6,9,10,15,18,30,45,90], and of these, 9, 18, 45 and 90 do not divide 120 while all the others do. So common-divisors =[1,2,3,5,6,10,15,30], exactly the printed list.
Why the other options are wrong
- (A) For 135, the common divisors are [1,3,5,9,15,45] (gcd 45). The list would contain 9 and 45 and would not contain 2.
- (C) For 144, the common divisors are [1,2,3,6,9,18] (gcd 18). 5 does not divide 144.
- (D) For 105, the common divisors are [1,3,5,15] (gcd 15). 105 is odd, so 2, 6, 10 and 30 cannot be in the list.