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 226 characters in body
Source Link
att
  • 22.8k
  • 2
  • 19
  • 70

Wolfram Language (Mathematica), 43 bytes

<|#-1->"odd"?"even"[[(-1)^#]]&~Array~5*^9|>

Try it online! Try it online! with a smaller upper bound of 5*^3

-4 bytes returning a symbol: remove the "s.

Evaluates to a function (Association) that returns a string"even" or "odd", or Missing ["KeyAbsent", i] if the corresponding segment is not included. Its 106388888892-character string representation can be split into:

  • A header <|,
  • 4294967296 segments of the form ni -> "odd"|"even", ,
  • and a 15158203136-character footer that begins 4294967296 -> "even", and ends 4999999999 -> "odd"|>.

Wolfram Language (Mathematica), 43 bytes

<|#-1->"odd"?"even"[[(-1)^#]]&~Array~5*^9|>

Try it online! with a smaller upper bound of 5*^3

-4 bytes returning a symbol: remove the "s.

Evaluates to a function (Association) that returns a string. Its string representation can be split into:

  • A header <|,
  • 4294967296 segments of the form n -> "odd"|"even", ,
  • and a 15158203136-character footer that begins 4294967296 -> "even", and ends 4999999999 -> "odd"|>.

Wolfram Language (Mathematica), 43 bytes

<|#-1->"odd"?"even"[[(-1)^#]]&~Array~5*^9|>

Try it online! with a smaller upper bound of 5*^3

-4 bytes returning a symbol: remove the "s.

Evaluates to a function (Association) that returns a string"even" or "odd", or Missing ["KeyAbsent", i] if the corresponding segment is not included. Its 106388888892-character string representation can be split into:

  • A header <|,
  • 4294967296 segments of the form i -> "odd"|"even", ,
  • and a 15158203136-character footer that begins 4294967296 -> "even", and ends 4999999999 -> "odd"|>.
Source Link
att
  • 22.8k
  • 2
  • 19
  • 70

Wolfram Language (Mathematica), 43 bytes

<|#-1->"odd"?"even"[[(-1)^#]]&~Array~5*^9|>

Try it online! with a smaller upper bound of 5*^3

-4 bytes returning a symbol: remove the "s.

Evaluates to a function (Association) that returns a string. Its string representation can be split into:

  • A header <|,
  • 4294967296 segments of the form n -> "odd"|"even", ,
  • and a 15158203136-character footer that begins 4294967296 -> "even", and ends 4999999999 -> "odd"|> .

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