← 返回 google 的题目列表Count Four-Digit Numbers with Digit Sum Equal to s
类型:online_judge
google
Given an integer s, find the number of all four-digit numbers whose digit sum equals s. Implement a function countFourDigitCodesWithSum that takes an integer s (0 ≤ s ≤ 36) as input and returns the count of such four-digit numbers.
Example
Input
10