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 69 characters in body
Source Link
totallyhuman
  • 17.4k
  • 3
  • 34
  • 89

Jelly, 2 bytesbytes

RS

Try it online!

Explanation

RS
 implicit input
 S sum of the...
R inclusive range [1..input]
 implicit output

Gauss sum, 3 bytesbytes

×ばつH

Explanation

×ばつH
 implicit input
 H half of the quantity of...
‘ input + 1...
 ×ばつ times input
 implicit output

Jelly, 2 bytes

RS

Try it online!

Explanation

RS
 implicit input
 S sum of the...
R inclusive range [1..input]
 implicit output

Gauss sum, 3 bytes

×ばつH

Explanation

×ばつH
 implicit input
 H half of the quantity of...
‘ input + 1...
 ×ばつ times input
 implicit output

Jelly, 2 bytes

RS

Try it online!

Explanation

RS
 implicit input
 S sum of the...
R inclusive range [1..input]
 implicit output

Gauss sum, 3 bytes

×ばつH

Explanation

×ばつH
 implicit input
 H half of the quantity of...
‘ input + 1...
 ×ばつ times input
 implicit output
edited body
Source Link
totallyhuman
  • 17.4k
  • 3
  • 34
  • 89

Jelly, 2 bytes

RS

Try it online!

Explanation

RS
 implicit input
 S sum of the...
R inclusive range [1..input]
 implicit output

Try it online!

Gauss sum, 3 bytes

×ばつH

Explanation

×ばつH
 implicit input
 H half of the quantity of...
‘ input + 1...
 ×ばつ times input
 implicit output

Jelly, 2 bytes

RS

Explanation

RS
 implicit input
 S sum of the...
R inclusive range [1..input]
 implicit output

Try it online!

Gauss sum, 3 bytes

×ばつH

Explanation

×ばつH
 implicit input
 H half of the quantity of...
‘ input + 1...
 ×ばつ times input
 implicit output

Jelly, 2 bytes

RS

Try it online!

Explanation

RS
 implicit input
 S sum of the...
R inclusive range [1..input]
 implicit output

Gauss sum, 3 bytes

×ばつH

Explanation

×ばつH
 implicit input
 H half of the quantity of...
‘ input + 1...
 ×ばつ times input
 implicit output
added 1 character in body
Source Link
totallyhuman
  • 17.4k
  • 3
  • 34
  • 89

Jelly, 2 bytes

RS

Explanation

RS
 implicit input
 S sum of the...
R inclusive range [1..input]
 S  sum
  implicit output

Try it online!

Gauss sum, 3 bytes

×ばつH

Explanation

×ばつH
 implicit input
 H increment
half ×ばつof the quantity multiplyof...
‘ by input + 1...
 ×ばつ H halvetimes input
 implicit output

Jelly, 2 bytes

RS

Explanation

RS
 implicit input
R inclusive range [1..input]
 S  sum
  implicit output

Try it online!

Gauss sum, 3 bytes

×ばつH

Explanation

×ばつH
 implicit input
 increment
 ×ばつ multiply by input
 H halve
 implicit output

Jelly, 2 bytes

RS

Explanation

RS
 implicit input
 S sum of the...
R inclusive range [1..input]
 implicit output

Try it online!

Gauss sum, 3 bytes

×ばつH

Explanation

×ばつH
 implicit input
 H half of the quantity of...
‘ input + 1...
 ×ばつ times input
 implicit output
added 49 characters in body
Source Link
totallyhuman
  • 17.4k
  • 3
  • 34
  • 89
Loading
added 37 characters in body
Source Link
totallyhuman
  • 17.4k
  • 3
  • 34
  • 89
Loading
added 24 characters in body
Source Link
totallyhuman
  • 17.4k
  • 3
  • 34
  • 89
Loading
Source Link
totallyhuman
  • 17.4k
  • 3
  • 34
  • 89
Loading

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