Please read the new rule regarding the restriction on the use of AI tools. ×

Help needed in a problem

Revision en2, by i_will_love_you_forever, 2020-12-09 07:58:34

Hi guy, I was trying to solve this problem (vietnameses) : https://codeforces.net/group/FLVn1Sc504/contest/274522/problem/Q

Translate : Given an integer n. Write all number from 1 to n and calculate sum of digit of all number.

For ex :

n = 5:   1 + 2 + 3 + 4 + 5 = 15

I found a solution for problem above : https://vnoi.info/problems/show_solution/SPSUM/1387592/

But i don't understand f10[] array in that code (after 5 hours thinking and still don't get it). Can somebody explain for me?

Tags #number_theory, #dp

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English i_will_love_you_forever 2020-12-09 07:58:34 3 Tiny change: ' I was try to solve ' -> ' I was trying to solve '
en1 English i_will_love_you_forever 2020-12-09 07:58:15 543 Initial revision (published)