Hi, I was wondering why Python on USACO cannot read my files. Is it because the formatting for my read input and output are wrong. Can somebody please tell me what is wrong. I have attached a sample code below. Thanks.
if name == ‘main’:
fin = open(‘word.in’, ‘r’)
fout = open(‘word.out’, ‘w’)
n, y = map(int, fin.readline().strip().split())
coo = fin.readline().strip().split()
subs = “”
i = 0
lent = 0
for i in range(n):
lent += len(coo[i])
Hi, I was wondering why Python on USACO cannot read my files. Is it because the formatting for my read input and output are wrong. Can somebody please tell me what is wrong. I have attached an image of the problem and the sample code below. Thanks.