Count total number of N digit numbers such that the difference between sum of even and odd digits is 1
Given a number n, we need to count total number of n digit numbers such that the sum of even digits is 1 more than the sum of odd digits. Here even and odd means positions of digits are like array indexes, for exampl, the leftmost (or leading) digit is considered as even digit, next to leftmost is considered as odd and so on.
Read full article from Count total number of N digit numbers such that the difference between sum of even and odd digits is 1 - GeeksforGeeks
No comments:
Post a Comment