HW program not working fine when uploaded

christian.gennarelli (1130 points)
1 2 7
asked Nov 2, 2021 in HW2 by christian.gennarelli (1,130 points)
When I try to run my program on my pc is working fine, passing all tests without any timeout, but when I try to upload it on Q2A it says that it passed only 3 tests. I also created a copy of the matches list, in order to not change it as requested. How is it possible? :(

2 Answers

Best answer
andrea.sterbini (172300 points)
510 927 1776
answered Nov 2, 2021 by andrea.sterbini (172,300 points)
selected Nov 2, 2021 by christian.gennarelli
Yu have not copied the list matches, but assigned the same list to another variable
KilianS (3590 points)
5 9 27
answered Nov 2, 2021 by KilianS (3,590 points)
try appending the items of matches to a new list instead of copying it. By "copying" it, you just assign the list to a new variable, it is still the same list.

hope that helps