Combinatorics

prepare

If you want to run the following program, you need to install Python3 on your operating system.

To get Python3, please go to the Python official website.

magic_square

Command syntax: magic_square.py n

For example: Typing command 'magic_square.py 3' will print a 3×3 magic square.

The script now only handles the magic squere those n is n/2 != 0, otherwise it will print 'None'.

count_the_number_of_the_vaild_phone_pattern

Command syntax: count_the_number_of_the_vaild_phone_pattern.py