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

Koshmarik Crash on 3 test [4] // Problem 1036. Lucky Tickets 26 Feb 2006 02:07
  Have anybody crash on 3 test?
It's interesting, that my friend decided this problem and on tests with n>50 we have the same answer.
Vitaliy_Ivashchenko Re: Crash on 3 test [3] // Problem 1036. Lucky Tickets 6 Feb 2008 23:09
I had. You must add in your programm something like this:

 if(sum/9>2*n){
  printf("0");
  return 0;
 }
phizaz Re: Crash on 3 test // Problem 1036. Lucky Tickets 8 Apr 2011 21:30
thanks. I just found my forgotten! my program cannot print 0 'zero' ( - -")
Anurag Ohri Re: Crash on 3 test [1] // Problem 1036. Lucky Tickets 29 Oct 2013 11:56
Why is this condition required? The recursive formula takes care of this.. Without this condition my code gets WA3.. And when I add it, it gets AC.. Could you plz give a test case where this condition is really required, where the DP formula fails..??
lqt121720 Re: Crash on 3 test // Problem 1036. Lucky Tickets 22 Jun 2022 08:43
I don't think it's DP formula's fault
Perhaps when you are deleting leading zero, you haven't judge if the point is >= 0