Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

-3 bytes
Source Link
dingledooper
  • 23.4k
  • 1
  • 40
  • 130

C (gcc), 55(削除) 55 (削除ここまで) 52 bytes

-3 bytes thanks to @G. Sliepen

#define f(s)0x4240165C085F34>>a64l{s=0x4240165C085F34>>a64l(s)%19537U%11702%56&1%19537U%11702%56&1;}

Try it online! Try it online!

The strategy used is the same as in @ovs's answer. We brute-force values corresponding to each string, making sure that no two truthy and falsey words share the same value. The answer is then extracted from a binary lookup table.

Here, the a64l() function converts a given string into a 32-bit signed integer.

C (gcc), 55 bytes

#define f(s)0x4240165C085F34>>a64l(s)%19537U%11702%56&1

Try it online!

The strategy used is the same as in @ovs's answer. We brute-force values corresponding to each string, making sure that no two truthy and falsey words share the same value. The answer is then extracted from a binary lookup table.

Here, the a64l() function converts a given string into a 32-bit signed integer.

C (gcc), (削除) 55 (削除ここまで) 52 bytes

-3 bytes thanks to @G. Sliepen

f(s){s=0x4240165C085F34>>a64l(s)%19537U%11702%56&1;}

Try it online!

The strategy used is the same as in @ovs's answer. We brute-force values corresponding to each string, making sure that no two truthy and falsey words share the same value. The answer is then extracted from a binary lookup table.

Here, the a64l() function converts a given string into a 32-bit signed integer.

unsigned -> signed
Source Link
dingledooper
  • 23.4k
  • 1
  • 40
  • 130

C (gcc), 55 bytes

#define f(s)0x4240165C085F34>>a64l(s)%19537U%11702%56&1

Try it online!

The strategy used is the same as in @ovs's answer. We brute-force values corresponding to each string, making sure that no two truthy and falsey words share the same value. The answer is then extracted from a binary lookup table.

Here, the a64l() function converts a given string into a 32-bit unsignedsigned integer.

C (gcc), 55 bytes

#define f(s)0x4240165C085F34>>a64l(s)%19537U%11702%56&1

Try it online!

The strategy used is the same as in @ovs's answer. We brute-force values corresponding to each string, making sure that no two truthy and falsey words share the same value. The answer is then extracted from a binary lookup table.

Here, the a64l() function converts a given string into a 32-bit unsigned integer.

C (gcc), 55 bytes

#define f(s)0x4240165C085F34>>a64l(s)%19537U%11702%56&1

Try it online!

The strategy used is the same as in @ovs's answer. We brute-force values corresponding to each string, making sure that no two truthy and falsey words share the same value. The answer is then extracted from a binary lookup table.

Here, the a64l() function converts a given string into a 32-bit signed integer.

Source Link
dingledooper
  • 23.4k
  • 1
  • 40
  • 130

C (gcc), 55 bytes

#define f(s)0x4240165C085F34>>a64l(s)%19537U%11702%56&1

Try it online!

The strategy used is the same as in @ovs's answer. We brute-force values corresponding to each string, making sure that no two truthy and falsey words share the same value. The answer is then extracted from a binary lookup table.

Here, the a64l() function converts a given string into a 32-bit unsigned integer.

AltStyle によって変換されたページ (->オリジナル) /