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

WA#7 (-)
Posted by Grigor Gevorgian 9 Jan 2009 21:59
I use java BigInteger and get WA#7
I use formula f(n,k)=f(n-1,k)+f(n-1,k-1)+...+f(n-1,k-9)
if you see it is wrong,please help

Edited by author 25.01.2009 13:43
Re: WA#7 - - > HELP NEEDED < - -
Posted by Payu WHH 18 Jan 2009 00:06
I use the same formula as you.

and I get WA#7 too.
Re: WA#7 - - > HELP NEEDED < - -
Posted by strider 18 Jan 2009 03:50
Do you realize that the number of such tickets can be of the order of 10^N, that is an N-digit number, where N~50 of decimal digits?

Edited by author 18.01.2009 03:51

Edited by author 18.01.2009 03:53
Bug fixed
Posted by Grigor Gevorgian 25 Jan 2009 13:29
The formula is correct,just made a stupid bug:
I wrote
a[j][i]=a[j][i].add(a[j][l])
instead of
a[j][i]=a[j][i].add(a[j][i-l])
:)

Edited by author 25.01.2009 13:42

Edited by author 25.01.2009 13:42
No subject
Posted by icanwin 17 Oct 2009 19:17
I guess that the test 7 contains 50 900. The test 8 contains 50 450.