<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described.
<END_TASK>
<USER_TASK:>
Description:
Sum of i * countDigits ( i ) ^ 2 for all i in range [ L , R ]
Python3 implementation of the approach ; Function to return the required sum ; If range is valid ; Sum of AP ; Driver code

<ASSISTANT_TASK:>
Python Code:
MOD = 1000000007 ; 
 def rangeSum(l , r ) : 
	 a = 1 ; b = 9 ; res = 0 ; 
 for i in range(1 , 11 ) : 
	 L = max(l , a ) ; 
 R = min(r , b ) ; 
 if(L <= R ) : 
	 sum =(L + R ) *(R - L + 1 ) // 2 ; 
 res +=(i * i ) *(sum % MOD ) ; 
 res %= MOD ; 
  a *= 10 ; 
 b = b * 10 + 9 ; 
  return res ; 
  if __name__== "__main __": 
	 l = 98 ; r = 102 ; 
 print(rangeSum(l , r ) ) ; 
 
<END_TASK>
