Wrote 2 Educational contests Codeforces: one virtual and one online.

Problem D confused me. The task was to find the length of maximal subsequence with lcm ≤ m. I tried to think about different approaches. DP? I can’t come up with states. Factorization? No ideas how to fit it in…