Problem code: LAPIN
code:
t = int(raw_input())
for i in range(t):
s = raw_input()
l = len(s)
freq1 = {}
freq2 = {}
if l % 2 == 0:
s1 = s[:l/2]
s2 = s[l/2:]
else:
s1 = s[:l/2]
s2 = s[l/2 + 1:]
for ele in s1:
if ele in freq1:
freq1[ele] += 1
else:
freq1[ele] = 1
for alp in s2:
if alp in freq2:
freq2[alp] += 1
else:
freq2[alp] = 1
if freq1 == freq2:
print "YES"
else:
print "NO"
Error on submission:
Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/python2.7/py_compile.py”, line 131, in compile
fc.flush()
IOError: [Errno 28] No space left on device
Can anyone tell me why this error occurred and how to fix it?