x="""1) 1)6 2) 120 3) 840 4) 90 2) 1) 60 2) 120 3) 728 4) 3250 3) 1) 27 2) 98 4) 2; 30; 90; 2 5) 216; 13200; 56; 192; 720; 4320; 720; 600 W1) 48 W2) 2 W3) 9 A1) Proof: Let d = gcd(n, n+1), so d divides (n+1) - n = 1, hence d = 1 A2) 143 A3) 144 A4) 100 A5) 75 A6) 1 A7) gcd(a, a+2) is 1 or 2; it equals 2 if and only if a is even A8) (12, 180), (36, 60) A9) 1 or 3; 1 or 5; 1, 3, or 9; 1, 2, 3, 6, 9, or 18 A10) 7 """ def cvt(x): "convert Katsias answer into canonical form" for ln in x.split(): if len(ln.strip()) == 0: continue print(ln)