One line, O(1) space/time, no DP/strings
Solution\n\ncsharp\npublic int CountVowelStrings(int n) =>\n    (n + 1) * (n + 2) * (n + 3) * (n + 4) / 24;\n\n\nExplanation\n\nThis is a pure math exercise wit
**Solution**\n\n```csharp\npublic int CountVowelStrings(int n) =>\n    (n + 1) * (n + 2) * (n + 3) * (n + 4) / 24;\n```\n\n**Explanation**\n\nThis is a pure math exercise with a single variable, so using DP or actually constructing strings is an overkill. Here is the formula to count [combinations with repetitions](https://math.stackexchange.com/questions/208377/combination-with-repetitions):\n![image](https://assets.leetcode.com/users/images/1f7a97c0-609e-462d-94d7-b3e4d74d2423_1652275068.9532337.png)\nwhere `m` is the number of distinct objects at our disposal and `n` is how many we can take.\n\nIn this case, we have 5 vowels to choose from, so `m = 5`. We proceed like this:\n![image](https://assets.leetcode.com/users/images/5ac049b2-e1fe-4896-9c97-4634aa652db9_1652275670.775265.png)\n\n
['Math', 'Combinatorics', 'C#']