Problem p03470 (python)

Fixed submission:
import subprocess
import gzip, base64, os
import stat

gz = b'H4sIAHSjaF0C/+19fXxUxbn/2c3bBkJ2eRHDixp1xaASsrwmorIhLJwDG0ASkKp42CQbiG52c3fPQrCgoUn8eVxWsbXW66e9pb2t1/b2VmpbS63lRQSsWgVsFUUFX9ANEQkiGKGw93lm5mzmnN2DYPu7f7EaZp/vPDPzzDPPPPOyZ87c6/HOsFosgvaxCjcJSD08zE1oN8MX1adYACsX8uHfy4SRQi7QORyfW3Drwl6WtRbaGF8W/GXDX7mV0uVWty4cyfi00MKFOQL/cevC++cKulAQilPpUNa9iym6d/ESXXggi+K7cvXprCxdL0vXy/i1ULAKulCrXzb7q2V4LauXFk5nfNM5fvzMO6g04Pe9EpNTcuvCtYxvrSHdzZAuVzj3j4OF87XyTPRSwuTXQq0dxgaa6iZNGBtoGBNoCkZbx7SWTxozaUJpJFQ6jsjkYLwz5yzQ6bGIyTyE2QDGH5uxrreu+KslS04NuumWiY899/ATc7+DceNZujz46ww6lmVfnm/FlG2QNcZNgr8p8Pf0O+P/3m/NOvlH9X/e/mBz8sX7O+uH/q1mffvab7mPjjkq31FYvLysxPN375DHCqr+Y2TLxpXSXc+Y6WUDFDwoAz7Ukhl/WsiMO1IWpP9cZoJ/LydzPpUm+Msm5d5swp+Ta5KPCf8QE/7T2ZnxMSb5HDLBp1kz4++a8I830du/meQzykT+D03yn2vWLiZ6/tQE32wizx0m+G4TeWaa2FuBSb2eN7Hb75vkYzPBa0zat9EEv8+k3HtM9NNkoucvTfTQbqK3vSb8b5rUq8JEzjMm+cRM6us2wZ82ycdlIv+9Jvk8biLnGpP8LcB/uTBcWFJH/XURw3usFF9Xv0Tn7/+WTfH1DF+k6Y3ls8VH8TatvVi56y9268otZXpuK9LjF0M+AyGftoYl3CgqCDOyKb6e4do48qGFluuu0/MPY3qbZyg3n+XTxvgdLKPBrF5Cg17+f2P67DHIKcD4FVEa6q+9FsesSYIsL20OBeWI4gsrsizIs5bL8/1Lm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b+HU502vvWQYu9CSXKKph9KuwzREn98losbqpd0oamz2vls7jeWa3rtrLOMb3P+rz4JcJJqh+PT7gQ1Fn/Wq6LkyOcwsRyP+hvR7gQ0SgBL1AtBrTQ1CneX6aWNXM71hOpMBpt3bmoEp883SGfrbedxXnNaS6XcVG+0Fqq35p7Tbl9OFIVf+GrNoiITkZTC0od6wmcdH/NDrgTngj0Sg+0Ne4AMmMXcwb3ZAm9Ow22cz9h/0XGyK8y+8K9vog9gdtkZb1V/6bFRD+gXKRo3URSIp2/kn7+bO4Fu1e8fTWvucrjF2u7lbeNMvX87oT9JuYk7PRH8ddaZc9Pe263PIeNs7kU3TixQAi6qQJfDlSpOyEs3KYGDl0Df9YZxwzCOXPPMKhXjT29gNXp5cdZzBeX2zK8cNbskfajRae+rmdb1GyFTgm10abiiTvOshzcLP+c7uDKPv2W46N7D7yUNemW4xTzehf8Fl3hmGSwOkuw4b4tgt1cZ76tNdn3ZheYYOSW8kz6Ao433sGVj4u7yN842moEB94P8CUvcKmW+KAAA='
bin = gzip.decompress(base64.b64decode(gz))
p = os.path.dirname(__file__)
pymain = os.path.join(p, "a.out")
with open(pymain, "wb") as f:
    f.write(bin)
os.chmod(pymain, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
if p == "":
    pymain = "./" + pymain
subprocess.call(pymain)


# compiled by pythran
'''
#pythran export main2()
import numpy as np
def main2():
    stdin = open('/dev/stdin')
    N = int(stdin.readline())
    d = np.empty(N, dtype=np.int64)
    for i in range(N):
        d[i] = int(stdin.readline())
    print(len(np.unique(np.sort(d))))
'''

Buggy submission (verdict: Runtime Error):
mport subprocess
import gzip, base64, os
import stat

gz = b'H4sIAGxEaV0C/+19fXxUxbn/2d28LG/ZRQMGBF1w1SCSZCFA4hubl4Vd2UAgAakvHDabDVnd7Ka7ZyEoViiJZV2jaevt5dp6y6/9tbX+fp/6clurVCEUBWttS7X1UvEFFXCXiIIi5Pq293lm5mzmnD0nBu3vfn5/eJTMPt95ZuaZ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13GlzjDR6UVPD1Eo/jcM35URQ973NNSkWwYE+OxQGvu2T7KnOjJJSoRhjkwSt1ldc+E0jKtnKNZNJi0z4LK0XzugULq9gXBZU+Vc+JRrhsg5/Kos2iNRcR2GOSg5vTMF00DRqfEZi//xAOnct2L8lQldRVyTyhS16YlFsu23Fc8y0rDQ8rndOW01IjOCXI6uaNvck830uy7OUcd5WaiPO9JKxflOWfKHDRPRztLL18FPQNcN0wbGskpSrxCIV739DKlrPQsIQ1H8eWO6FI5oUCkTW3Y2ZPKlBohA/qXO5VLVSbZu6qu0MgPxdIY1YY7SkzFHiAvNWkdE5ZrQv+E07I0hiYVpDhvCuLY0VDqc91y3ZZ8IphGh6RHfmkoSn3gmQYLf1iWyhLx6Crq7v4bRrIp3D95AAA='
bin = gzip.decompress(base64.b64decode(gz))
p = os.path.dirname(__file__)
pymain = os.path.join(p, "a.out")
with open(pymain, "wb") as f:
    f.write(bin)
os.chmod(pymain, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
if p == "":
    pymain = "./" + pymain
subprocess.call(pymain)


# compiled by pythran
'''
#pythran export main2()
def main2():
    stdin = open('/dev/stdin')
    N = int(stdin.readline())
    s = set()
    for i in range(N):
        s.add(int(stdin.readline()))
    print(len(s))
'''