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 4
deleted 12 characters in body
Alex A.
  • 24.8k
  • 5
  • 39
  • 120

Julia, 42 bytes - 25 = 17

print("@"^42((r=readline())>""?int(r):2))

This reads a line from STDIN using readline(). If it's empty, i.e. no input has been provided, then n is defined to be the input converted to an integer. Otherwise n is 2. We then print 42​n @s to STDOUT.

Alex A.
  • 24.8k
  • 5
  • 39
  • 120

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