Skip to main content
1 of 2
user2357112
  • 779
  • 6
  • 12

Multiply by 1041204193.

When the result of a multiplication doesn't fit in an int, you won't get the exact result, but you will get a number equivalent to the exact result modulo 2**32. That means that if the number you multiplied by was coprime to 232 (which just means it has to be odd), you can multiply by its multiplicative inverse to get your number back. Wolfram Alpha or the extended Euclidean algorithm can tell us 33's multiplicative inverse modulo 232 is 1041204193. So, multiply by 1041204193, and you have the original x back.

user2357112
  • 779
  • 6
  • 12