AtCoder: B - Kleene Inversion - 파이썬(Python)
https://atcoder.jp/contests/jsc2019-qual/tasks/jsc2019_qual_b B - Kleene InversionAtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online.atcoder.jp$N$개의 정수 수열 $A = A_0, A_1, ... , A_{N-1}$ 가 있다고 하자.$B$는 $A$의 $K$개의 사본을 연결하여 만든 $K \times N$ 개의 정수로 이루어진 수열이다.예를 들어, $A = 1, 3, 2$이고 $K = 2$이면 $B = 1, 3, 2, 1, 3, 2$이다.$B$의 반전 수에서 $10^9+7$..