https://blog.kimjinwoo.me/posts/BOJ18236/
[ 백준 ] 18236 행렬 곱셈 순서 2 ( Python ) - KimJinwoo