← All Duels

gemini-3-flash-preview_vs_gpt-5.5.jsonl — 10 puzzles

gemini-3-flash-preview
-4
vs
gpt-5.5
2
#1 Sample Solution Wrong
def mystery(x):
    if not isinstance(x, int) or x <= 0:
        return False
    if x.bit_length() != 32:
        return False
    
    # Obfuscation steps
    y = ((x << 13) | (x >> 19)) & 0xFFFFFFFF
    y = (y ^ 0x6A09E667)
    y = (y + 0xBB67AE85) & 0xFFFFFFFF
    y = y ^ (y >> 16)
    
    return y == 0xF93B350C
0xDEADBEEF
Proposer: gemini-3-flash-preview Solver: gpt-5.5
-1 vs 0
#2 Solved
def mystery(x):
    import hashlib

    if type(x) is not str:
        return False
    if len(x) != 1_000_000:
        return False

    try:
        b = x.encode("ascii")
    except UnicodeEncodeError:
        return False

    return hashlib.sha256(b).hexdigest() == (
        "cdc76e5c9914fb9281a1c7e284d73e67"
        "f1809a48a497200e046d39ccc7112cd0"
    )
"a" * 1000000
"a"*1000000
Proposer: gpt-5.5 Solver: gemini-3-flash-preview
-1 vs 0
#3 Solved
def mystery(x):
    if not isinstance(x, int) or not (0 <= x < 0x100000000):
        return False
    
    # Unpack 32-bit integer into a state of two 16-bit values
    s = [(x >> 16) & 0xFFFF, x & 0xFFFF]
    
    # Round keys for the transformation
    k = [0x1234, 0x5678, 0x9ABC, 0xDEF0]
    
    for i in range(4):
        # A round function: 16-bit left rotation by 5 and XOR with key
        # The state is mixed based on a Feistel-like network structure
        r = (((s[1] << 5) | (s[1] >> 11)) & 0xFFFF) ^ k[i]
        s[0], s[1] = s[1], (s[0] ^ r) & 0xFFFF
        
    # Re-pack the resulting state into a 32-bit integer and compare to target
    res = (s[0] << 16) | s[1]
    return res == 758011221
0x37420AF7
927075063
Proposer: gemini-3-flash-preview Solver: gpt-5.5
-1 vs 0
#4 Solver Failed
def mystery(x):
    import hashlib
    import unicodedata

    if type(x) is not str:
        return False
    if len(x) != 43:
        return False
    if any(ord(ch) < 128 for ch in x):
        return False

    s = unicodedata.normalize("NFKC", x)

    try:
        b = s.encode("ascii")
    except UnicodeEncodeError:
        return False

    if len(b) != 43:
        return False

    def r13(c):
        if 65 <= c <= 90:
            return ((c - 65 + 13) % 26) + 65
        if 97 <= c <= 122:
            return ((c - 97 + 13) % 26) + 97
        return c

    b = bytes(r13(c) for c in b)

    return int.from_bytes(hashlib.sha256(b).digest(), "little") == (
        0x92e5c937bfd0022d76db3c6de451568d4f2e08b0bc9aca699480d707b3fba8d7
    )
"The quick brown fox jumps over the lazy dog"
"\uff27\uff55\uff52\u3000\uff44\uff48\uff56\uff50\uff58\u3000\uff4f\uff45\uff42\uff4a\uff41\u3000\uff53\uff42\uff4b\u3000\uff57\uff48\uff5a\uff43\uff46\u3000\uff42\uff49\uff52\uff45\u3000\uff47\uff55\uff52\u3000\uff59\uff4e\uff4d\uff4c\u3000\uff51\uff42\uff54"
Proposer: gpt-5.5 Solver: gemini-3-flash-preview
-1 vs 1
#5 Sample Solution Wrong
def mystery(x):
    if not isinstance(x, int) or not (0 <= x < 0x100000000):
        return False
    
    # Transformation parameters
    p = [15, 30, 10, 25, 2, 17, 7, 22, 12, 27, 5, 20, 0, 18, 9, 24,
         14, 31, 11, 26, 3, 16, 6, 21, 13, 28, 4, 19, 1, 29, 8, 23]
    
    # Phase 1: Confusion (XOR)
    x = (x ^ 0xDEADBEEF) & 0xFFFFFFFF
    
    # Phase 2: Diffusion (Bit-level Permutation)
    res = 0
    for i in range(32):
        if (x >> i) & 1:
            res |= (1 << p[i])
    
    # Phase 3: Mixing (Modular Addition and Circular Shift)
    x = (res + 0x1337C0DE) & 0xFFFFFFFF
    x = ((x << 7) | (x >> 25)) & 0xFFFFFFFF
    
    # Phase 4: Final XOR
    x ^= 0x5CA1AB1E
    
    return x == 0xBAADF00D
417633707
Proposer: gemini-3-flash-preview Solver: gpt-5.5
-2 vs 1
#6 Solver Failed
def mystery(x):
    if type(x) is not int:
        return False

    n = int(
        "109417386415705274218097073220403576120037329454492059909138421314763499842889"
        "34784717997257891267332497625752899781833797076537244027146743531593354333897"
    )

    if not (1 < x < n - 1):
        return False

    return pow(x, 2, n) == 1
447141624461051515254245647573614661706692994474744747802872362543023307525287114843793437119008953153527217316712398501253011403063533814420313885623041
(lambda p,q: 1 + p*((-2*pow(p, -1, q)) % q))(102639592829741105772054196573991675900716567808038066803341933521790711307779,106603488380168454820927220360012878679207958575989291522270608237193062808643)
Proposer: gpt-5.5 Solver: gemini-3-flash-preview
-2 vs 2
#7 Sample Solution Wrong
def mystery(x):
    if not isinstance(x, int) or not (0 <= x < 0x10000000000000000):
        return False
    
    # Phase 1: Modular arithmetic and XOR-based confusion
    # The input integer is mixed using a constant XOR and a 
    # modular multiplication with a large odd constant.
    x ^= 0x5555555555555555
    x = (x * 0x9E3779B97F4A7C15) & 0xFFFFFFFFFFFFFFFF
    
    # Phase 2: Multi-step XOR-shift diffusion
    # These operations are inspired by common pseudo-random number 
    # generators and are designed to diffuse the bits across the 
    # 64-bit integer. Each step is a reversible bijection.
    x ^= (x >> 32)
    x = (x ^ (x << 16)) & 0xFFFFFFFFFFFFFFFF
    x ^= (x >> 8)
    
    return x == 0xa7382bb8d29258dd
1234567890123456789
Proposer: gemini-3-flash-preview Solver: gpt-5.5
-3 vs 2
#8 Solved
def mystery(x):
    import hmac

    if type(x) is not str:
        return False
    if len(x) != 28:
        return False
    if any(ch not in "abcdefghijklmnopqrstuvwxyz ?" for ch in x):
        return False

    table = str.maketrans(
        "abcdefghijklmnopqrstuvwxyz",
        "nopqrstuvwxyzabcdefghijklm",
    )
    msg = x.translate(table)

    digest = hmac.new(b"Jefe", msg.encode("ascii"), "sha256").digest()

    return digest[::-1].hex() == (
        "4338ec64b958ec9d8339279d083f005a"
        "c77595082624046a4e7560bf46c1dc5b"
    )
"jung qb ln jnag sbe abguvat?"
"jung qb ln jnag sbe abguvat?"
Proposer: gpt-5.5 Solver: gemini-3-flash-preview
-3 vs 2
#9 Sample Solution Wrong
def mystery(x):
    if not isinstance(x, int) or not (0 <= x < 0x10000000000000000):
        return False
    
    # Transformation parameters
    mask = 0xFFFFFFFFFFFFFFFF
    
    # Step 1: Initial XOR confusion
    x = (x ^ 0x123456789ABCDEF0) & mask
    
    # Step 2: Multiplicative diffusion using a large odd constant
    x = (x * 0x3141592653589793) & mask
    
    # Step 3: XOR-shift right
    x = (x ^ (x >> 17)) & mask
    
    # Step 4: XOR-shift left
    x = (x ^ (x << 33)) & mask
    
    # Step 5: Secondary multiplicative diffusion
    x = (x * 0x2718281828459045) & mask
    
    # Step 6: Final XOR-shift for bit avalanche
    x = (x ^ (x >> 29)) & mask
    
    return x == 11405786438676216239
16045690984833331213
Proposer: gemini-3-flash-preview Solver: gpt-5.5
-4 vs 2
#10 Solved
def mystery(x):
    import hmac
    import hashlib

    if type(x) is not str:
        return False

    if len(x) != 50:
        return False

    try:
        raw = x.encode("latin-1")
    except UnicodeEncodeError:
        return False

    msg = bytes((b ^ 0x57) for b in raw)

    if any(c in b"\x00\r\n" for c in msg):
        return False

    key = bytes((0xAA ^ ((i * 31337) & 0)) for i in range(20))

    digest = hmac.new(key, msg, hashlib.sha256).digest()

    target = bytes.fromhex(
        "fe65d5ce145563d922c1f83e8b095929"
        "a78191d0ebb84d85460e80361ea93e77"
    )[::-1]

    return digest == target
"\x8a" * 50
"\x8a"*50
Proposer: gpt-5.5 Solver: gemini-3-flash-preview
-4 vs 2