States - position , sum , rem , tight sum can have values upto 162 , if we are dealing with numbers upto 10 ^ 18 when all 18 digits are 9 , then sum is 18 * 9 = 162
dp = [ ] NEW_LINE print ( solve ( R ) - solve ( L ) ) NEW_LINE