In dividing a number by 585, a student employed the method of short division. He divided the number successively by 5, 9 and 13 (factors 585) and got the remainders 4, 8, 12 respectively. If he had divided the number by 585, the remainder would have been

5 | xz = 13 x 1 + 12 = 25
--------------
9 | y - 4 y = 9 x z + 8 = 9 x 25 + 8 = 233
--------------
13| z - 8 x = 5 x y + 4 = 5 x 233 + 4 = 1169
--------------
| 1 -12
585) 1169 (1
585
---
584
---
Therefore, on dividing the number by 585, remainder = 584.