|
|
вернуться в форумWhy my idea is wrong? When n>10 is a prime, i am writing n=k*3+l*2, where l=1,2 or 3 depending whether n mod 3 = 1 2 or 0. Then I get lcm=3^k*2^l, which is the maximal with respect to all possible divisions of n. However, my program gives WA6. Am I correct? Thanks! Re: Why my idea is wrong? Clearly the lcm of k 3's and l 2's is at most 6 -- you are asked the lcm of them, not the product of them. |
|
|