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 2
deleted 560 characters in body
Laikoni
  • 26.4k
  • 7
  • 54
  • 116

Haskell + CPP, line length 2, (削除) 705 (削除ここまで) 237 bytes

m\
a\
i\
n\
=\
p\
u\
t\
S\
t\
r\
$\
(\
:\
"\
\\
\\
\\
n\
"\
)\
=\
<\
<\
s\
+\
+\
s\
h\
o\
w\
 \
s\
;\
s\
=\
"\
m\
a\
i\
n\
=\
p\
u\
t\
S\
t\
r\
$\
(\
:\
\\
"\
\\
\\
\\
\\
\\
\\
n\
\\
"\
)\
=\
<\
<\
s\
+\
+\
s\
h\
o\
w\
 \
s\
;\
s\
=\
"\

Try it online! Using the flag -CPP which enables the C pre-processor allows us to use a backslash at the end of a line to continue it on the next line.

The actual code is main=putStr$(:"\\\n")=<<s++show s;s="<data>".

Edit: A casual -468 bytes thanks to Ørjan Johansen!

Laikoni
  • 26.4k
  • 7
  • 54
  • 116

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