http://www.perlmonks.org?node_id=1086720


in reply to Re: The 10**21 Problem (Part 4)
in thread The 10**21 Problem (Part 4)

Luckily, it was accepted by both shinh's golf server, when I submitted it about a month ago, and the code golf server also (currently down). Shinh's server runs Python 2.7.2 on Linux, the code golf server Python 2.5 on Linux.

It would be interesting to see the actual hash value and Python version by running this version:

import sys print sys.version_info magic = chr(17)+chr(11)+chr(119)+chr(60)+chr(47)+chr(44)+chr(78)+chr(1 +03)+chr(125)+chr(48) for r in ["M", "D", "C", "L", "X", "V", "I"]: h = hash(r + magic) n = h % 1001 print r, n, "(" + str(h) + ")"
which produced for me on Windows just now:
sys.version_info(major=2, minor=7, micro=5, releaselevel='final', seri +al=0) M 1000 (2094745652) D 500 (1641493353) C 100 (277891714) L 50 (1566900385) X 10 (1666291637) V 5 (-1570643069) I 1 (1060402344)
Strange, that this is the same Python version 2.7.5 as reported by mr_mischief but on a different platform (Windows vs MacOS). I tested both 32-bit and 64-bit Python on Windows (multiple versions) and didn't see a failure.

On shinh's golf server it produced:

sys.version_info(major=2, minor=7, micro=2, releaselevel='final', seri +al=0)\n M 1000 (2094745652) D 500 (1641493353) C 100 (277891714) L 50 (1566900385) X 10 (1666291637) V 5 (-1570643069) I 1 (1060402344)
This is doubly strange because that is the same Python version 2.7.2 running on the same platform, Linux, which failed for RMGir!

I will check the Python C sources version history later when I get more time.