LCM equation
Chef is exploring a new mathematical problem, which can be stated as follows: where [x] means greatest integer which doesn't exceed x. Chef wants you to answer some questions for a given pair of integers N, K: What is the least common multiple of F(N, 1), F(N, 2), ... , F(N, K) modulo 109 + 7. Chef is not willing to give you all queries at once. Instead, he gives you the first query and
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start