Sep 26, 2023
Say you take every integer from \( [1,n] \) and multiply them together. Is it a perfect square? What do you need to take away?
Try directly build the number with modular inverse. Alternatively also look up Chinese Remainder Theorem.
Write down the DP function. Can you see the connection between the function and what we covered in the class?