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
Commonmark migration

Perl 5.10, 8 bytes

The two numbers to add must be on 2 separate lines for this one to work:

say<>+<>

Try this one here.

One with input on the same line (14 + 1 bytes for -a flag)

say$F[0]+$F[1]

Try it here!

One with input on the same line (19 + 1 bytes for -a flag)

map{$s+=$_}@F;say$s

Try this one here.

Another one, by changing the array default separator (19 + 1 bytes for -a flag as well)

$"="+";say eval"@F"

Try this one here!

Sake
  • 901
  • 5
  • 11

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