What number must be sussitituted with S to make it divisible by 36?
S will be divisible by 4 and 9, as it is divisible by 36. As it is divisible by 4, it has to be an even number. And since sum of digits will also be divisible by 9, adding up, we have 2S + 11 being divisible by 9. Clearly, for S = -1, 2S + 11 = 9, divisible by 9. Since it's a multiple of 2, next it will be divisible only when you add 18, that is increase S by another 9. So -1 + 9 = 8 => at S = 8, 2S + 11 will be divisible by 9 => 843480 is divisible by 36.
Note: You should have asked what DIGIT to be substituted for S, not number, for in that case the results become more complexly patterned.