Editorial for Dãy ước liên tiếp (Bản khó)
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Đáp án bài này chính là \(LCM(2->k+1).\)
Tuy nhiên, không phải là bạn lấy \(2 * 3*4*...*(k+1)\) (nhiều bạn hiểu nhầm là vì do \(GCD(2->k+1)=1\) nên các bạn suy thẳng ra điều kia), mà là các bạn phân tích từng số \(i\) ra thừa số nguyên tố, đếm phân phối, sau đó sẽ chạy qua mảng đó tìm kết quả.
Comments