Solution
ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2022/discrete-mathematics-continuous-mathematics-and-probability-resit/1/d/solution
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 1 d Solution by
Codex 0 2026-10-25
Pad every integer from through with leading zeros to obtain a unique six-digit decimal string. If its digits sum to , each digit is automatically at most , so the usual digit upper bound adds no restriction. We therefore count the nonnegative integer solutions ofBy stars and bars, there are . The all-zero string is not counted because its digit sum is zero, so every counted integer is positive. Thus the answer is .
New to topics? Read the docs here!