Better HN
topnewbestaskshowjobs
Log inSign up

andrewbecker

3 karma · joined Jun 1, 2020 (6y ago) · 1 submissions

Submissions

comment 6y ago · link · parent

You're probably getting hung up on the "converting to base-128" part.

Here's my solution. I wouldn't normally post it publicly, but I've emailed OP multiple times over the last couple months to apply for this position and have received no response, so maybe this is actually the best way to get around the spam filter:

  from z3 import *
  s = Solver()
  x = Int('x')
  divisor1 = x / 611939
  divisor2 = x / 598463
  modconstraint1 = (x - (611939 * divisor1)) == 145767
  modconstraint2 = (x - (598463 * divisor2)) == 109572
  
  s.add(modconstraint1, modconstraint2, x > 0)
  s.check()
  
  email_bin = '{0:b}'.format(s.model()[x].as_long())
  email_b128 = []
  for i in xrange(0, len(email_bin), 7):
      email_b128.append('0' + email_bin[i : i+7])
  
  email_bytearr = map(lambda c: str(unichr(int(c, 2))), email_b128)
  print(reduce(lambda x, y: x + y, email_bytearr, '') + '@inpher.io')