Skip to main content
added 74 characters in body
Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Python 2 and Python 3, 3636 34 bytes, score 1818 17

print(intstr(hash(float('-inf'))/-1e5)[1])

In Python 2Python 2, the hash of negative infinity is -271828 but in Python 3Python 3 it's -314159. Edit: Saved 2 bytes, 1 point of score, thanks to @ArBo.

Python 2 and Python 3, 36 bytes, score 18

print(int(hash(float('-inf'))/-1e5))

In Python 2, the hash of negative infinity is -271828 but in Python 3 it's -314159.

Python 2 and Python 3, 36 34 bytes, score 18 17

print(str(hash(float('-inf')))[1])

In Python 2, the hash of negative infinity is -271828 but in Python 3 it's -314159. Edit: Saved 2 bytes, 1 point of score, thanks to @ArBo.

added 10 characters in body
Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Python 2 and Python 3, 36 bytes, score 18

print(int(hash(float('-inf'))/-1e5))

In Python 2, the hash of negative infinity is -271828 but in Python 3 it's -314159.

Python 2 and Python 3, 36 bytes

print(int(hash(float('-inf'))/-1e5))

In Python 2, the hash of negative infinity is -271828 but in Python 3 it's -314159.

Python 2 and Python 3, 36 bytes, score 18

print(int(hash(float('-inf'))/-1e5))

In Python 2, the hash of negative infinity is -271828 but in Python 3 it's -314159.

Source Link
Neil
  • 177.3k
  • 12
  • 74
  • 281

Python 2 and Python 3, 36 bytes

print(int(hash(float('-inf'))/-1e5))

In Python 2, the hash of negative infinity is -271828 but in Python 3 it's -314159.