Loser_'s blog

By Loser_, history, 3 months ago, In English

hello I am stuck in this problem Digit Queries.I think I need to use recursion here although not quite sure how? Which algo or technique I need to study to solve this problem? Also please share similar types of problems from other ojs.Please help me with that.

 
 
 
 
  • Vote: I like it
  • -2
  • Vote: I do not like it

»
3 months ago, # |
  Vote: I like it 0 Vote: I do not like it

simple constructive algorithms is enough to solve this

»
3 months ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

This string contains numbers, numbers contain digits.

Note: summary length of all n-digit numbers is easy to calculate.

more detailed solution
»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Hello,

  • I try to solve this problem https://cses.fi/problemset/task/2431/
  • I come up with a formuler:
  • x is length of number (1,2,3,4)
  • k = 9*1 + 90*2 + 900*3 + 9000*4 +..+9*(10^x)*x : total number

here my code: https://cses.fi/paste/f1e04f128ac4fe471ae4e1/ however, my code passed only two first test cases. I don't know what wrong with my code.

Here are test cases' result

Please help me to point what's wrong. thank you.

»
7 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

this problem is same as Digits Sequence

»
7 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Good Constructive Algorithm question! Here is my descriptive solution (https://ideone.com/4yYbq4)