For any n \in \mathbb{N}, let S(n) be the sum of the digits of n. Let M=\max \{S(a)+S(b)+S(c) \mid a+b+c=2009, a, b, c \in \mathbb{N}\}. How many triples (a, b, c) of natural numbers are there such that S(a)+S(b)+S(c)=M?
For any n \in \mathbb{N}, let S(n) be the sum of the digits of n. Let M=\max \{S(a)+S(b)+S(c) \mid a+b+c=2009, a, b, c \in \mathbb{N}\}. How many triples (a, b, c) of natural numbers are there such that S(a)+S(b)+S(c)=M?