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

Commonmark migration
Source Link

#Ruby, 51 bytes

Ruby, 51 bytes

x="";$><<x[-1]while/hello./!~x=x[/.{0,5}$/]+$<.getc
  • Does not expect newlines
  • Works with infinite input

#Ruby, 51 bytes

x="";$><<x[-1]while/hello./!~x=x[/.{0,5}$/]+$<.getc
  • Does not expect newlines
  • Works with infinite input

Ruby, 51 bytes

x="";$><<x[-1]while/hello./!~x=x[/.{0,5}$/]+$<.getc
  • Does not expect newlines
  • Works with infinite input
Post Undeleted by G B
deleted 40 characters in body
Source Link
G B
  • 23.4k
  • 1
  • 24
  • 55

#Ruby, 5851 bytes

x=`stty raw`;$><<x[x="";$><<x[-1]while/hello./!~x=(x[-4~x=x[/.{0,4]||x)+$<5}$/]+$<.getc
  • Does not expect newlines
  • Echoes every single character
  • Works with infinite input

#Ruby, 58 bytes

x=`stty raw`;$><<x[-1]while/hello/!~x=(x[-4,4]||x)+$<.getc
  • Does not expect newlines
  • Echoes every single character
  • Works with infinite input

#Ruby, 51 bytes

x="";$><<x[-1]while/hello./!~x=x[/.{0,5}$/]+$<.getc
  • Does not expect newlines
  • Works with infinite input
Post Deleted by G B
Source Link
G B
  • 23.4k
  • 1
  • 24
  • 55

#Ruby, 58 bytes

x=`stty raw`;$><<x[-1]while/hello/!~x=(x[-4,4]||x)+$<.getc
  • Does not expect newlines
  • Echoes every single character
  • Works with infinite input

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