Python 2/3 REPL, 36 33 bytes, 36 33/2=38 16.5 score
[3,2]['cmp' in dir(__builtins__)]
Try it in a Python shell. It (ab)uses removed builtins in Python 3. cmp
was a builtin in Python 2, but was removed in Python 3, and it would result a truthy value in Python 2 and falsey in Python 3, and use it to index the [3,2]
list, if it is 0, then it would output 3
and for 1
it would output 2
.
To make this solution, first I took the bulitins list from Python 2, made it a set, and subtracted set of Python 3 builtins from it
s={'ArithmeticError', 'AssertionError', 'AttributeError', 'BaseException', 'BufferError', 'BytesWarning', 'DeprecationWarning', 'EOFError', 'Ellipsis', 'EnvironmentError', 'Exception', 'False', 'FloatingPointError', 'FutureWarning', 'GeneratorExit', 'IOError', 'ImportError', 'ImportWarning', 'IndentationError', 'IndexError', 'KeyError', 'KeyboardInterrupt', 'LookupError', 'MemoryError', 'NameError', 'None', 'NotImplemented', 'NotImplementedError', 'OSError', 'OverflowError', 'PendingDeprecationWarning', 'ReferenceError', 'RuntimeError', 'RuntimeWarning', 'StandardError', 'StopIteration', 'SyntaxError', 'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError', 'True', 'TypeError', 'UnboundLocalError', 'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError', 'UnicodeTranslateError', 'UnicodeWarning', 'UserWarning', 'ValueError', 'Warning', 'ZeroDivisionError', '_', '__debug__', '__doc__', '__import__', '__name__', '__package__', 'abs', 'all', 'any', 'apply', 'basestring', 'bin', 'bool', 'buffer', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod', 'cmp', 'coerce', 'compile', 'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'execfile', 'exit', 'file', 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'intern', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'long', 'map', 'max', 'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property', 'quit', 'range', 'raw_input', 'reduce', 'reload', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'unichr', 'unicode', 'vars', 'xrange', 'zip'}-(set(dir(__builtins__)))
Which is
{'reduce', 'cmp', 'basestring', 'reload', 'file', 'unicode', 'buffer', 'execfile', 'apply', 'raw_input', 'unichr', 'coerce', 'StandardError', 'xrange', 'intern', 'long'}
And for good sort from smallest to largest
sorted(s,key=lambda x:len(x))
So we could use these builtins, amongst them, cmp
is the shortest:
'cmp', 'file', 'long', 'apply', 'reduce', 'reload', 'buffer', 'unichr', 'coerce', 'xrange', 'intern', 'unicode', 'execfile', 'raw_input', 'basestring', 'StandardError'
(number of languages)^3 / (byte count)
. \$\endgroup\$