Skip to main content
fixed formatting
Source Link
Citty
  • 951
  • 6
  • 8

Pyth, 5757 54 bytes

 X$globalsu_.tG1lX$globals()$"neg"$__import__("decimal").Decimal$
u_.tG1ZDecimal

This would be much shorter if we didn't need the Decimal to be up to spec, but it is what it is.

Try it online! Edit 1: -3 bytes because we need a number anyways, so we can use Xs returned copy of globals() length as our starting value, moving it to the end and removing a $ and some whitespace.

Try it online!

Pyth, 57 bytes

 X$globals()$"neg"$__import__("decimal").Decimal$
u_.tG1Z

This would be much shorter if we didn't need the Decimal to be up to spec, but it is what it is.

Try it online!

Pyth, 57 54 bytes

u_.tG1lX$globals()$"neg"$__import__("decimal").Decimal

This would be much shorter if we didn't need the Decimal to be up to spec, but it is what it is.

Edit 1: -3 bytes because we need a number anyways, so we can use Xs returned copy of globals() length as our starting value, moving it to the end and removing a $ and some whitespace.

Try it online!

Source Link
Citty
  • 951
  • 6
  • 8

Pyth, 57 bytes

 X$globals()$"neg"$__import__("decimal").Decimal$
u_.tG1Z

This would be much shorter if we didn't need the Decimal to be up to spec, but it is what it is.

Try it online!