← All Duels

claude-sonnet-4-6_vs_gpt-5.5.jsonl — 10 puzzles

claude-sonnet-4-6
0
vs
gpt-5.5
1
#1 Solved
def mystery(x):
    try:
        n = int(x)
        if n <= 1: return False
        import math
        v = 5 * n * n
        a, b = math.isqrt(v + 4), math.isqrt(v - 4)
        if not (a * a == v + 4 or b * b == v - 4): return False
        if not (999 < n < 10000): return False
        s = sum(int(c) for c in str(n))
        return s > 1 and not any(s % k == 0 for k in range(2, s))
    except:
        return False
2584
2584
Proposer: claude-sonnet-4-6 Solver: gpt-5.5
0 vs 0
#2 Solved
def mystery(x):
    try:
        import hashlib

        if type(x) not in (str, int, float):
            return False

        s = str(x)

        if len(s) != 44:
            return False
        if any(not (32 <= ord(c) <= 126) for c in s):
            return False
        if s.count(" ") != 8 or s.count(".") != 1:
            return False
        if sorted(map(len, s.split(" "))) != [3, 3, 3, 4, 4, 4, 5, 5, 5]:
            return False

        a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
        b = "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm"
        y = s[::-1].translate(str.maketrans(b, a))

        pieces = (
            "aa631564d5d789c2",
            "b765448c8635fb6c",
            "82526529a9b63d97",
            "ef537f25c895bfa7",
        )
        target = "".join(pieces[i] for i in (3, 2, 0, 1))

        return hashlib.sha256(y.encode("utf-8")).hexdigest() == target
    except Exception:
        return False
".tbq lmny rug erib fczhw kbs ajbeo xpvhd ruG"
".tbq lmny rug erib fczhw kbs ajbeo xpvhd ruG"
Proposer: gpt-5.5 Solver: claude-sonnet-4-6
0 vs 0
#3 Solved
def mystery(x):
    try:
        import math

        n = int(x)

        if len(str(n)) != 5:
            return False

        def _p(k):
            if k < 2: return False
            return not any(k % j == 0 for j in range(2, math.isqrt(k) + 1))

        root = math.isqrt(n)
        if root * root != n or not _p(root):
            return False

        digits = str(n)
        if len(set(digits)) < 5:
            return False

        sigma = lambda s: sum(int(c) for c in s)
        if not _p(sigma(digits)):
            return False
        if not _p(sigma(str(root))):
            return False

        return any(c == '0' for c in digits)

    except:
        return False
39601
39601
Proposer: claude-sonnet-4-6 Solver: gpt-5.5
0 vs 0
#4 Solved
def mystery(x):
    try:
        if isinstance(x, bool):
            return False

        if isinstance(x, int):
            z = int(x)
        elif isinstance(x, str):
            if not x or len(x) > 7000:
                return False
            if any(c < "0" or c > "9" for c in x):
                return False
            z = int(x)
        else:
            return False

        a = ((1 << 10) | (1 << 8)) - 1
        b = a * ((a & 31) ^ 15)

        mask = (1 << (b - (a >> 1))) | (1 << ((a << 1) + 11)) | 0x5F3759DF
        y = z ^ mask

        N = (
            (1 << (a + b)) - (1 << b)
            + (1 << (12 * a)) - (1 << (11 * a))
            + (1 << (8 * a)) - (1 << (7 * a)) - (1 << (6 * a))
            + (1 << (5 * a)) + (1 << (4 * a)) - (1 << (3 * a))
            - (1 << ((a << 1) + 1)) + (3 << a) - 1
        )

        if not (1 < y < N - 1):
            return False
        if not (b < y.bit_length() < a + b):
            return False
        if y & 1:
            return False

        return pow(y, 2, N) == 1
    except Exception:
        return False
((1 << 20464) + (1 << 14069) + (1 << 8953) - (1 << 6395) + (1 << 3837) - (1 << 1280)) ^ ((1 << 19825) | (1 << 2569) | 0x5F3759DF)
((1 << 20464) + (1 << 14069) + (1 << 8953) - (1 << 6395) + (1 << 3837) - (1 << 1280)) ^ ((1 << 19825) | (1 << 2569) | 0x5F3759DF)
Proposer: gpt-5.5 Solver: claude-sonnet-4-6
0 vs 0
#5 Solved
def mystery(x):
    try:
        import math

        n = int(x)
        s = str(n)
        k = len(s)

        if k != 5:
            return False

        d = [int(c) for c in s]

        # Check 1
        if sum(1 for i in range(k) for j in range(i + 1, k) if d[i] != d[j]) != k * (k - 1) // 2:
            return False

        # Check 2
        sm = sum(d)
        if sm < 2 or any(sm % q == 0 for q in range(2, sm)):
            return False

        # Check 3
        seq = d[:]
        while seq[-1] < n:
            seq.append(sum(seq[-k:]))
            if len(seq) > 10 ** 4:
                return False

        return seq[-1] == n

    except Exception:
        return False
86935
86935
Proposer: claude-sonnet-4-6 Solver: gpt-5.5
0 vs 0
#6 Solved
def mystery(x):
    try:
        import hashlib

        if not isinstance(x, str):
            return False
        if len(x) != 24:
            return False
        if not all(("A" <= c <= "Z") or ("a" <= c <= "z") for c in x):
            return False

        lo = "abcdefghijklmnopqrstuvwxyz"
        hi = lo.upper()
        y = x.translate(str.maketrans(lo + hi, lo[::-1] + hi[::-1]))

        if y[:8].lower() != y[:8]:
            return False
        if y[8:16].upper() != y[8:16]:
            return False
        if y[16:].lower() != y[16:]:
            return False

        salt = ("saltSALT" * 4 + "salt").encode("ascii")
        dk = hashlib.pbkdf2_hmac("sha1", y.encode("ascii"), salt, 4096, 25).hex()

        pieces = (
            "62c0e44a8b291a96",
            "4cf2f07038",
            "e41c849b80c8d836",
            "3d2eec4f",
        )
        target = pieces[3] + pieces[2] + pieces[0] + pieces[1]

        return dk == target
    except Exception:
        return False
"kzhhdliwKZHHDLIWkzhhdliw"
"kzhhdliwKZHHDLIWkzhhdliw"
Proposer: gpt-5.5 Solver: claude-sonnet-4-6
0 vs 0
#7 Solved
def mystery(x):
    try:
        import math

        n = int(x)
        s = str(n)

        # Must be exactly 6 digits
        if len(s) != 6:
            return False

        # n must be a triangular number T_k = k*(k+1)//2
        disc = 1 + 8 * n
        sq = math.isqrt(disc)
        if sq * sq != disc or (sq - 1) % 2 != 0:
            return False
        k = (sq - 1) // 2
        if k * (k + 1) // 2 != n:
            return False

        def is_prime(m):
            if m < 2: return False
            if m == 2: return True
            if m % 2 == 0: return False
            for i in range(3, math.isqrt(m) + 1, 2):
                if m % i == 0: return False
            return True

        # The triangular index k must be prime
        if not is_prime(k):
            return False

        # All 6 digits of n must be distinct
        if len(set(s)) != 6:
            return False

        # Digit sum of n must be prime
        ds_n = sum(int(c) for c in s)
        if not is_prime(ds_n):
            return False

        # Digit sum of k must also be prime
        ds_k = sum(int(c) for c in str(k))
        if not is_prime(ds_k):
            return False

        return True

    except:
        return False
534061
534061
Proposer: claude-sonnet-4-6 Solver: gpt-5.5
0 vs 0
#8 Solved
def mystery(x):
    try:
        if type(x) is int:
            n = x
        elif type(x) is str:
            if not (0 < len(x) <= 220):
                return False
            if x[0] == "0" or any(c < "0" or c > "9" for c in x):
                return False
            n = int(x)
        else:
            return False

        if n <= 0:
            return False

        y = n + 1

        if y.bit_length() != 521 or not (y & 1):
            return False

        def pack(*terms):
            return sum(s * (1 << e) for e, s in terms)

        a = pack(
            (1254, 1), (910, 1), (618, 1), (521, 1),
            (733, -1), (389, -1), (97, -1),
        ) - 1

        b = pack(
            (1987, 1), (1644, 1), (1352, 1), (1299, 1), (1255, 1),
            (1008, 1), (911, 1), (715, 1), (619, 1), (522, 1),
            (1466, -1), (1123, -1), (831, -1), (778, -1), (734, -1),
            (487, -1), (390, -1), (194, -1), (98, -1),
        ) - 2

        if a % y != 0 or b % y != 0:
            return False

        u = a // y
        v = b // y

        return u * u + 1 == v
    except Exception:
        return False
2**521 - 2
6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057150
Proposer: gpt-5.5 Solver: claude-sonnet-4-6
0 vs 0
#9 Solved
def mystery(x):
    try:
        n = int(x)
        s = str(n)

        if len(s) != 8:
            return False

        def check(m):
            if m < 2:
                return False
            b = bin(m)[2:]
            i = 0
            while i < len(b) and b[i] == '1':
                i += 1
            if i == 0 or i >= len(b):
                return False
            if any(c != '0' for c in b[i:]):
                return False
            return len(b) - i == i - 1

        if not check(n):
            return False

        ds = sum(int(c) for c in s)
        return check(ds)

    except:
        return False
33550336
33550336
Proposer: claude-sonnet-4-6 Solver: gpt-5.5
0 vs 0
#10 Solver Failed
def mystery(x):
    try:
        if type(x) is not str:
            return False
        if len(x) != 64 or any(c not in "0123456789abcdef" for c in x):
            return False

        p = (1 << 255) - 19

        k = bytearray.fromhex(x)
        k[0] &= 248
        k[31] &= 127
        k[31] |= 64
        n = int.from_bytes(k, "little")

        x1 = 9
        x2, z2 = 1, 0
        x3, z3 = x1, 1
        swap = 0

        for t in range(254, -1, -1):
            kt = (n >> t) & 1
            swap ^= kt
            if swap:
                x2, x3 = x3, x2
                z2, z3 = z3, z2
            swap = kt

            a = (x2 + z2) % p
            aa = (a * a) % p
            b = (x2 - z2) % p
            bb = (b * b) % p
            e = (aa - bb) % p
            c = (x3 + z3) % p
            d = (x3 - z3) % p
            da = (d * a) % p
            cb = (c * b) % p

            x3 = ((da + cb) * (da + cb)) % p
            z3 = (x1 * (da - cb) * (da - cb)) % p
            x2 = (aa * bb) % p
            z2 = (e * (aa + 121665 * e)) % p

        if swap:
            x2, x3 = x3, x2
            z2, z3 = z3, z2

        y = (x2 * pow(z2, p - 2, p)) % p
        h = y.to_bytes(32, "little").hex()

        pieces = (
            "eba4a98eaa9b4e6a",
            "0dbf3a0d26381af4",
            "748b7ddcb43ef75a",
            "8520f0098930a754",
        )
        return h == pieces[3] + pieces[2] + pieces[1] + pieces[0]

    except Exception:
        return False
"77076d0a7318a57d3c16c17251b26645dfcd6f6508f3ce4fd7d18cdfe7f8d23b"
"77076d0a7318a57d3c16c17251b26645df4c2f87ebc0992ab177fba51db92c2a"
Proposer: gpt-5.5 Solver: claude-sonnet-4-6
0 vs 1