ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1036. Lucky Tickets

I get WA#3.What is the right answer for this tests?
Posted by Enigma [UB of TUIT] 19 Nov 2010 11:52
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?
Posted by Israel Batista 22 Jan 2011 04:52
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
Posted by S.77 9 Aug 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?
Posted by Raman Gupta 5 Oct 2012 20:45
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?
Posted by DEVI LAL 3 Jan 2017 23:51
answer is very big it cannot be stored in 64 bits ,  U need to find another way.