Follow-up: extract argument parsing logic into separate function
@DylanGriffith left a comment at !94 (comment 447750221) about how to deal with a command-line argument,
@changzhengliu I think the fact that the main function is long is a separate issue we could tackle from this. For example you could extract CLI parsing functions. The main point here is that the fact that we're dealing with parsing strings into ints at all is a function of the fact that this is a command line tool. The command line tool part of this codebase should be abstracted from all the business logic as it will make it much easier to make the code adaptable for situations where this is not a command line tool. I think a similar pattern is common in web applications where you want the parsing of HTML requests to be well abstracted from all other parts of the business logic.
So, I am creating this follow-up issue to explore next step of code improvement around argument parsing.