Count of digits after concatenation of first N positive integers | C # program to find the number of digits after concatenating the first N positive integers ; Function to find the number of digits after concatenating the first N positive integers ; Driver code
using System ; class GFG { static void numberOfDigits ( int N ) { int nod = ( int ) Math . Floor ( Math . Log10 ( N ) + 1 ) ; int toDecrease = ( int ) ( Math . Pow ( 10 , nod ) - 1 ) / 9 ; Console . Write ( ( N + 1 ) * nod - toDecrease ) ; } public static void Main ( ) { int N = 13 ; numberOfDigits ( N ) ; } }