text: Function to count the number of N - digit numbers such that sum of every K consecutive digits are equal
code: public static void count ( int n , int k ) { long count = ( long ) ( Math . pow ( 10 , k ) - Math . pow ( 10 , k - 1 ) ) ;