Again, what I did was far worse. After the initial factor plan with unknown x,y I actually did the various possible x,y to exclude with the known false digits (and the remainder for BCD is not that little...)Might be a better way indeed of solving it, but it seems straightforward enough.

Spoiler:

ABC divisible by 3,4,5 => divisible by 60 => C = 0

BCD divisible by 5,8 => divisible by 40 => D = 0

=> "BCD" also divisible by 100 => divisible by 200

=> B E {2, 4, 6, 8} => B = 2 since the other digits have been explicitly excluded

=> AB a multiple of 6 which ends with "2" => AB E {12,42,72}

=> A = 7 since 1 and 4 have been explicitly excluded

The code is7 2 0 0

Still, I think that there should be a way to do this with polynomial division and/including a two-variable equation

What follows isn't that, however, it's just a rewriting of what you did,

*combining*it with the not that bad parts of my own method. Of course I'd had utilized c,d=0 if I had seen it.

**Spoiler**

*:*

Last edited: