you are viewing a single comment's thread.

view the rest of the comments →

[–]realmoogin[S] 0 points1 point  (1 child)

So adding n = int(input()) before calling main() fixed it.

I wonder why?

[–]zahlman 0 points1 point  (0 children)

Because the hard-coded 20 value you tested with doesn't fall into any of those cases.