Rosetta Problems

Kth term of Linearly Recurrent Sequence

https://judge.yosupo.jp/problem/kth_term_of_linearly_recurrent_sequence