Problem #PRU-100543

Problems Number Theory Arithmetic operations. Number identities

Problem

Shmerlin managed to enter the cave and explore it. On his way back, he was once again stopped by Drago. He learns that the door out of the cave is locked again, this time with a more powerful lock. The key required to open it now includes four positive integers, which are no longer digits – they can be much larger. Shmerlin once again can choose four integer numbers: \(x, y, z\) and \(w\), and the dragon will tell him the value of \(A \times x + B \times y + C \times z + D \times w\), where \(A, B, C\) and \(D\) are the four secret integer numbers that open the lock. Because the lock is much more difficult to crack now, Drago agrees to let Shmerlin try twice. He can choose his four integer numbers and then, basing on what he learns from the dragon, choose again. Will he be able to leave the cave or is he doomed to stay inside forever?