Let pqr, qrp and rpq be three digit numbers. Then, pqr + qrp + rpq is divisible by:
pqr = 100p + 10q + r
qrp = 100q + 10r + p
rpq = 100r + 10p + q
Adding all three,
pqr + qrp + rpq = 100p + 10q + r + 100q + 10r + p + 100r + 10p + q
pqr + qrp + rpq = 100(p + q +r) + 10(p + q + r) + (p + q + r)
pqr + qrp + rpq = (100 + 10 + 1)(p + q + r) = 111(p + q +r)
pqr + qrp + rpq = 3 x 37(p + q + r)
Hence, pqr + qrp + rpq is divisible by 37