def mystery(x):
try:
n = int(x)
s = str(n)
if len(s) < 3:
return False
t = sum(int(s[i]) ** (i + 1) for i in range(len(s)))
if t != n:
return False
q = sum(int(c) for c in s)
return q > 1 and all(q % j != 0 for j in range(2, q))
except:
return False
def mystery(x):
try:
s = str(x)
if len(s) != 6 or any(not ('a' <= c <= 'z') for c in s):
return False
n = [ord(c) - 97 for c in s]
p = [n[(11 * i + 1) % 6] for i in range(6)]
q = [((p[i] * 7 + 13) % 26) for i in range(6)]
r = [q[5 - i] ^ ((i << 1) + i + 9) for i in range(6)]
return bytes(r) == b"\x04\x0e\x1f\x14\x00\x0f"
except:
return False
def mystery(x):
try:
n = int(x)
s = str(n)
if len(s) != 6 or s[0] == '0':
return False
d = [int(c) for c in s]
# Check 1
if s != s[::-1]:
return False
# Check 2
if sum(d) != 36:
return False
# Check 3
rots = [int(s[i:] + s[:i]) for i in range(6)]
if len({v % 37 for v in rots}) != 1:
return False
# Check 4
if len(set(d)) < 3:
return False
return True
except:
return False
def mystery(x):
try:
s = str(x)
if len(s) != 7 or any(not ('0' <= ch <= '9') for ch in s) or s[0] == '0':
return False
d = [ord(ch) - 48 for ch in s]
if sum(d) * 3 + d[0] != 95:
return False
if d[1] - d[6] != 7:
return False
a = [(d[(3 * i + 2) % 7] + i * i + 4) % 10 for i in range(7)]
b = [(a[(i + 3) % 7] * 7 + 1) % 10 for i in range(7)]
c = [b[6 - i] ^ (i % 3 + 1) for i in range(7)]
return bytes(c) == b"\x02\x05\x00\t\x01\x05\x01"
except:
return False
def mystery(x):
try:
s = str(x)
if len(s) != 8 or any(not ('a' <= c <= 'z') for c in s):
return False
n = [ord(c) - 97 for c in s]
p = [n[i // 2 + (i % 2) * 4] for i in range(8)]
q = [(p[i] * 5 + i * 7 + 4) % 26 for i in range(8)]
r = [q[i] ^ q[(i * 3 + 1) % 8] for i in range(8)]
return bytes(r) == b"\x02\x1b\x12\x02\x0d\x14\x0f\x1f"
except:
return False
def mystery(x):
try:
s = str(x)
if len(s) != 10 or any(not ('a' <= c <= 'z') for c in s):
return False
a = [ord(c) - 97 for c in s]
# A few easy-to-miss consistency checks
if sum(a) != 135:
return False
if sum((i + 1) * a[i] for i in range(10)) != 569:
return False
if (a[0] ^ a[3] ^ a[5] ^ a[9]) != 23:
return False
# Obfuscated transform chain
p = [a[(3 * i + 1) % 10] for i in range(10)]
q = [(p[i] * 11 + i * i + 5) % 26 for i in range(10)]
r = [q[i] ^ ((q[(i - 1) % 10] + 7 * i) & 31) for i in range(10)]
return bytes(r) == b"\x1b\x1f\x1c\x16\x04\x16\x07\x0b\x1c\x0f"
except:
return False
def mystery(x):
try:
s = str(x)
if len(s) != 6 or any(not ('a' <= c <= 'z') for c in s):
return False
a = [ord(c) - 97 for c in s]
if sum(a) != 64:
return False
if sum((i + 1) * a[i] for i in range(6)) != 246:
return False
perm = [3, 0, 5, 2, 1, 4]
p = [a[perm[i]] for i in range(6)]
q = [(p[i] * 9 + i * 5 + 3) % 26 for i in range(6)]
r = [q[i] ^ q[(i + 2) % 6] for i in range(6)]
return bytes(r) == b"\x07\x1c\x0b\x0a\x0c\x16"
except:
return False
def mystery(x):
try:
s = str(x)
if len(s) != 9 or any(not ('a' <= c <= 'z') for c in s):
return False
a = [ord(c) - 97 for c in s]
if sum(a) != 108:
return False
if sum((i + 1) * a[i] for i in range(9)) != 607:
return False
if (a[0] ^ a[4] ^ a[8]) != 29:
return False
p = [a[(4 * i + 2) % 9] for i in range(9)]
q = [((p[i] * 7 + i * i + 11) % 26) for i in range(9)]
r = [q[(i + 3) % 9] ^ ((q[i - 1] + 5 * i + 9) & 31) for i in range(9)]
return bytes(r) == b"\x1a\x0b\x08\x1e\x0c\x00\x07\x14\x15"
except:
return False
def mystery(x):
try:
s = str(x)
if len(s) != 8 or any(not ('a' <= c <= 'z') for c in s):
return False
a = [ord(c) - 97 for c in s]
if sum(a) != 94:
return False
if sum((i + 1) * a[i] for i in range(8)) != 330:
return False
perm = [2, 5, 0, 7, 3, 1, 6, 4]
p = [a[perm[i]] for i in range(8)]
q = [(p[i] * 13 + i * 7 + 5) % 26 for i in range(8)]
r = [q[i] ^ q[(i * 5 + 3) % 8] for i in range(8)]
return bytes(r) == b"\x08\x09\x1d\x1e\x16\x1a\x19\x17"
except:
return False
def mystery(x):
try:
s = str(x)
if len(s) != 11 or any(not ('a' <= c <= 'z') for c in s):
return False
a = [ord(c) - 97 for c in s]
if sum(a) != 172:
return False
if sum((i + 1) * a[i] for i in range(11)) != 1016:
return False
if sum(a[::2]) != 98:
return False
if (a[1] ^ a[4] ^ a[9]) != 7:
return False
p = [a[(4 * i + 1) % 11] for i in range(11)]
q = [((7 * p[i] + 3 * p[i - 1] + i * i + 4) % 26) for i in range(11)]
r = bytes((q[10 - i] ^ (11 * i + 5)) & 31 for i in range(11))
return r == b"\x12\x19\x14\x1f\x05\x19\x13\x18\x0e\x11\x11"
except:
return False