Please tell me where’s my code for “Marks Discrepency” has gone wrong. It Works fine in my machine http://www.codechef.com/viewsolution/5083426
n = int(raw_input())
students =[0,0,0,0,0]
frequency = [{},{},{},{},{}]
for i in range(n):
x = raw_input()
subject = ord(x[0])-65
students[subject] +=1
(frequency[subject])[x[2:]] = (frequency[subject]).get(x[2:],0) + 1
for i in range(5):
list = frequency[i]
unusual = []
for j in range(len(list)):
if list[list.keys()[j]] / (students[i]*1.0) > 0.1 :
unusual = unusual + [list.keys()[j]]
if len(unusual) == 0:
print "Nothing Unusual"
else :
unusual.sort()
for k in range(len(unusual)):
print unusual[k],
print ""