Digit Dp problem needs help

Revision en2, by Loser_, 2020-12-08 15:41:36

Need help with this digit dp problem Almost Everywhere Zero from Atcoder. Here,I increase the $$$cnt$$$ value if the $$$i$$$ th digit is non zero.Base case is if cnt==k return 1 or 0 otherwise.My submission works for smaller values but fails larger inputs or maybe I am missing some cases.I also see others solutions but couldn't find one using reccursion in my approach. Need help here. Thank you

My submission

Tags digitdp, #atcoder, help

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Loser_ 2020-12-08 15:41:36 82
en1 English Loser_ 2020-12-08 15:38:03 468 Initial revision (published)