text: Count of N digit Numbers whose sum of every K consecutive digits is equal | Set 2 | Function to count the number of N - digit numbers such that sum of every K consecutive digits are equal ; Print the answer ; Driver Code
code: def count ( n , k ) : NEW_LINE INDENT count = ( pow ( 10 , k ) - pow ( 10 , k - 1 ) ) ; NEW_LINE print ( count ) ; NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT n = 2 ; NEW_LINE k = 1 ; NEW_LINE count ( n , k ) ; NEW_LINE DEDENT