返回题库

AIME 2003 I · 第 9 题

AIME 2003 I — Problem 9

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

An integer between 10001000 and 99999999, inclusive, is called balanced if the sum of its two leftmost digits equals the sum of its two rightmost digits. How many balanced integers are there?

解析

Solution 1

If the common sum of the first two and last two digits is nn, such that 1n91 \leq n \leq 9, there are nn choices for the first two digits and n+1n + 1 choices for the second two digits (since zero may not be the first digit). This gives n=19n(n+1)=330\sum_{n = 1}^9 n(n + 1) = 330 balanced numbers. If the common sum of the first two and last two digits is nn, such that 10n1810 \leq n \leq 18, there are 19n19 - n choices for both pairs. This gives n=1018(19n)2=n=19n2=285\sum_{n = 10}^{18} (19 - n)^2 = \sum_{n = 1}^9 n^2 = 285 balanced numbers. Thus, there are in total 330+285=615330 + 285 = \boxed{615} balanced numbers.

Both summations may be calculated using the formula for the sum of consecutive squares, namely k=1nk2=n(n+1)(2n+1)6\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6}.

Solution 2 (Painful Casework)

Call the number abcd\overline{abcd}. Then a+b=c+da+b=c+d. Set a+b=xa+b=x.

Clearly, 0x180\le x \le18.

If x=0x=0: 00000000 is not acceptable.

If x=1x=1: The only case is 10011001 or 10101010. 2 choices.

If x=2x=2: then since a0a\neq0, a=1=ba=1=b or a=2,b=0a=2, b=0. There are 3 choices for (c,d)(c,d): (2,0),(0,2),(1,1)(2,0), (0, 2), (1, 1). 23=62*3=6 here.

If x=3x=3: Clearly, aba\neq b because if so, the sum will be even, not odd. Counting (a,b)=(3,0)(a,b)=(3,0), we have 44 choices. Subtracting that, we have 33 choices. Since it doesn't matter whether c=0c=0 or d=0d=0, we have 4 choices for (c,d)(c,d). So 34=123*4=12 here.

If x=4x=4: Continue as above. 44 choices for (a,b)(a,b). 55 choices for (c,d)(c,d). 45=204*5=20 here.

If x=5x=5: You get the point. 56=305*6=30.

If x=6x=6: 67=426*7=42.

If x=7x=7: 78=567*8=56.

If x=8x=8: 89=728*9=72.

If x=9x=9: 910=909*10=90.

Now we need to be careful because if x=10x=10, (c,d)=(0,10)(c,d)=(0,10) is not valid. However, we don't have to worry about a0a\neq0.

If x=10x=10: (a,b)=(1,9),(2,8),...,(9,1)(a,b)=(1,9), (2, 8), ..., (9, 1). Same thing for (c,d)(c,d). 99=819*9=81.

If x=11x=11: We start at (a,b)=(2,9)(a,b)= (2,9). So 888*8.

Continue this pattern until x=18:11=1x=18: 1*1=1. Add everything up: we have 615\boxed{615}.

~hastapasta

Solution 3

We ignore the requirement that the first digit is non-zero, and do casework on the sum of the sum of the pairs of digits.

If two digits aa and bb sum to 00, we have 11 possibility: (a,b)=(0,0)(a,b) = (0,0)

If a+b=1a+b = 1, we have 22 possibilities: (a,b)=(0,1)(a,b) = (0,1) and (a,b)=(1,0)(a,b) = (1,0)

a+b=2a+b = 2: (0,2)(0,2), (2,0)(2,0), and (1,1)(1,1) are the only 33 possibilities.

We notice a pattern: for all k9k \leq 9, there are k+1k+1 ordered pairs of digits (a,b)(a,b) such that a+b=ka+b = k. Then, testing for 10k1810 \leq k \leq 18, we notice that there are (18k)+1(18 - k) + 1 ordered pairs with a sum of kk.

So the number of ways to pick 44 digits satisfying the constraint is

(1)(1)+(2)(2)(10)(10)+(9)(9)++(1)(1)=(10)(11)(21)6+(9)(10)(19)6=670(1)(1) + (2)(2) \dots (10)(10) + (9)(9) + \dots + (1)(1) = \frac{(10)(11)(21)}{6} + \frac{(9)(10)(19)}{6} = 670 We have to subtract out the cases where the first digit is 00, which is 1+2++10=551+2+\dots+10 = 55

So our answer is 67055=615670-55 = \boxed{615}

This solution takes some inspiration from dice. In a way, we are counting the number of ways to roll a given number with a pair of 1010-sided dice.

~jd9