HW program not working fine when uploaded

christian.gennarelli (1120 points)
1 1 7
asked Nov 2, 2021 in HW2 by christian.gennarelli (1,120 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? :(
83 views

2 Answers

Best answer
andrea.sterbini (168140 points)
488 897 1729
answered Nov 2, 2021 by andrea.sterbini (168,140 points)
selected Nov 2, 2021 by christian.gennarelli
Yu have not copied the list matches, but assigned the same list to another variable
KilianS (3460 points)
5 8 27
answered Nov 2, 2021 by KilianS (3,460 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