I just started learning Python and can’t for the life of me figure out why my solution isn’t accepted. Could anyone tell me what’s happening?
from sys import stdin import psyco psyco.full() def main(): tests = int(stdin.readline()) frequencies = *(10**6 + 1) for i in range(tests): num = int(stdin.readline()) frequencies[num] += 1 for i in range (len(frequencies)): if frequencies[i] > 0: print i main()
Before I imported psyco and psyco.full() as CodeChef’s FAQs recommend for speeding up Python submissions, I would just get TLE. Now it’s constantly NZEC and I look at other solutions; mine doesn’t seem much different.
Note: I’m running my test cases on Python 2.7.6 IDLE