-2

Does anyone know how to reverse this equation when only Y, Z are known? I want to know what X is.

(X + Y) % 62 = Z

bicycle
  • 8,315
  • 9
  • 52
  • 72

2 Answers2

6
(X + Y) % 62 = Z

means that X+Y = 62*n + Z for arbitrary integer n, from that follows

X = 62*n+Z-Y

where n can be any integer value, if you need single solution you can pick arbitrary one or if you have any extra limitations on X value you'll need to find X that satisfies them

Vladimir
  • 170,431
  • 36
  • 387
  • 313
4
X = Z - Y + 62*n

where n is any integer.

Paul R
  • 208,748
  • 37
  • 389
  • 560