2. Required Problems

In this section, you are required to complete the problems below and submit your code to OJ website.

Remember, you can use ok to test your code:

$ python3 ok  # test all functions
$ python3 ok -q <class / func>  # test single class / function