July 2017 Fiendish Function

The Fiendish Function posed during July 2017 had the following sample guesses and replies:

  • GUESS
  • REPLY
  • 1
  • 8
  • 2
  • 5
  • 3
  • 0
  • 4
  • 83
  • 5
  • 74
  • 10
  • 899

The rule was: "Square the number, then convert each digit to 9 minus the digit".

Suppose the guess was 12:

  • Square the number, giving 144.
  • Convert each digit to 9 minus the digit, giving 855.

So the result is 855.