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

added 41 characters in body
Source Link
Nitrodon
  • 10.8k
  • 2
  • 20
  • 36

brainfuck, 2120 bytes

Saved 1 byte thanks to Jo King.

+>,[>,[-<->]<[>>]>]<[<],]<.

Try it online! Try it online!

Readable output! Readable output!

Takes input two characters at a time, and moves away from the 1 on the tape if any pair doesn't match. EOF is treated as 0 and thus handled automatically.

Output is a null byte if the string is not double speak, and 0x01 if it is. The readable version outputs these as characters at a cost of 14 bytes.

brainfuck, 21 bytes

+>,[>,[-<->]<[>>],]<.

Try it online!

Readable output!

Takes input two characters at a time, and moves away from the 1 on the tape if any pair doesn't match. EOF is treated as 0 and thus handled automatically.

Output is a null byte if the string is not double speak, and 0x01 if it is. The readable version outputs these as characters at a cost of 14 bytes.

brainfuck, 20 bytes

Saved 1 byte thanks to Jo King.

+>,[>,[-<->]<[<],]<.

Try it online!

Readable output!

Takes input two characters at a time, and moves away from the 1 on the tape if any pair doesn't match. EOF is treated as 0 and thus handled automatically.

Output is a null byte if the string is not double speak, and 0x01 if it is. The readable version outputs these as characters at a cost of 14 bytes.

Source Link
Nitrodon
  • 10.8k
  • 2
  • 20
  • 36

brainfuck, 21 bytes

+>,[>,[-<->]<[>>],]<.

Try it online!

Readable output!

Takes input two characters at a time, and moves away from the 1 on the tape if any pair doesn't match. EOF is treated as 0 and thus handled automatically.

Output is a null byte if the string is not double speak, and 0x01 if it is. The readable version outputs these as characters at a cost of 14 bytes.

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