|
|
вернуться в форумI get WA#3.What is the right answer for this tests? 2 4 2 6 2 8 4 2 4 4 4 6 4 8 Re: I get WA#3.What is the right answer for this tests? In: 2 4 Out: 9 In: 2 6 Out: 16 In: 2 8 Out: 25 In: 4 2 Out: 16 In: 4 4 Out:100 In: 4 6 Out: 400 In: 4 8 Out: 1225 :) WA3 guess Послано S.77 9 авг 2011 03:54 As far as I guess, the right answer for WA3 is zero. And it comes up when, for instance, you have "N=2" and "S=38". Four bits cannot produce the sum more then thirty six, you know. Re: I get WA#3.What is the right answer for this tests? My answers are same for all the test cases you have written here. My recursive formula is m[len][sum] = m[len-1][sum-k] for 0<=k<=9. Then why is it showing wrong anwser for test case 2. Edited by moderator 12.01.2022 16:54 Re: I get WA#3.What is the right answer for this tests? answer is very big it cannot be stored in 64 bits , U need to find another way. |
|
|