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 Revisions

2 of 3
unsigned -> signed
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 signed integer.

dingledooper
  • 23.4k
  • 1
  • 40
  • 130

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