返回题库

AIME 1999 · 第 5 题

AIME 1999 — Problem 5

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

For any positive integer xx_{}, let S(x)S(x) be the sum of the digits of xx_{}, and let T(x)T(x) be S(x+2)S(x).|S(x+2)-S(x)|. For example, T(199)=S(201)S(199)=319=16.T(199)=|S(201)-S(199)|=|3-19|=16. How many values of T(x)T(x) do not exceed 1999?

解析

Solution

For most values of xx, T(x)T(x) will equal 22. For those that don't, the difference must be bumping the number up a ten, a hundred, etc. If we take T(a999)T(a999) as an example,

(a+1)+0+0+1(a+9+9+9)=29(3)|(a + 1) + 0 + 0 + 1 - (a + 9 + 9 + 9)| = |2 - 9(3)| And in general, the values of T(x)T(x) will then be in the form of 29n=9n2|2 - 9n| = 9n - 2. From 77 to 19991999, there are 199979=222\left\lceil \frac{1999 - 7}{9}\right\rceil = 222 solutions; including 22 and there are a total of 223\boxed{223} solutions.