2013 AIME I Exam Problems

Scroll down and press Start to try the exam! Or, go to the printable PDF, answer key, or professional solutions curated by LIVE by Po-Shen Loh.

All of the real AMC 8, AMC 10, AMC 12, and AIME problems in our complete solution collection are used with official legal permission of the Mathematical Association of America (MAA).

Or jump straight to one problem with its solution: 1 · 2 · 3 · 4 · 5 · 6 · 7 · 8 · 9 · 10 · 11 · 12 · 13 · 14 · 15

Want to learn professionally through interactive video classes?

Learn LIVE

Time Left:

3:00:00

1.

The AIME Triathlon consists of a half-mile swim, a 3030-mile bicycle ride, and an eight-mile run. Tom swims, bicycles, and runs at constant rates. He runs five times as fast as he swims, and he bicycles twice as fast as he runs. Tom completes the AIME Triathlon in four and a quarter hours. How many minutes does he spend bicycling?

Answer: 150
Concepts:distance rate and timeratio and proportionunit conversion

Difficulty rating: 1840

Solution:

Let Tom's swimming speed be ss miles per hour. Then he runs at 5s5s and bicycles at 10s.10s. The total time in hours is 0.5s+3010s+85s=0.5+3+1.6s=5.1s=4.25,\frac{0.5}{s} + \frac{30}{10s} + \frac{8}{5s} = \frac{0.5 + 3 + 1.6}{s} = \frac{5.1}{s} = 4.25, so s=5.14.25=1.2s = \frac{5.1}{4.25} = 1.2 miles per hour.

He bicycles at 1212 miles per hour, so the ride takes 3012=2.5\frac{30}{12} = 2.5 hours, which is 150150 minutes.

2.

Find the number of five-digit positive integers, n,n, that satisfy the following conditions:

• the number nn is divisible by 5,5,

• the first and last digits of nn are equal, and

• the sum of the digits of nn is divisible by 5.5.

Answer: 200

Difficulty rating: 2020

Solution:

Since nn is divisible by 5,5, its last digit is 00 or 5;5; since the first digit equals the last digit and cannot be 0,0, both are 5.5. The outer digits contribute 1010 to the digit sum, so the three middle digits must also sum to a multiple of 5.5.

Choose the second and third digits freely, in 1010=10010 \cdot 10 = 100 ways. Whatever their sum is, the fourth digit must land in a prescribed residue class modulo 5,5, and exactly 22 of the digits 00 through 99 lie in each class. The count is 10102=200.10 \cdot 10 \cdot 2 = 200.

3.

Let ABCDABCD be a square, and let EE and FF be points on AB\overline{AB} and BC,\overline{BC}, respectively. The line through EE parallel to BC\overline{BC} and the line through FF parallel to AB\overline{AB} divide ABCDABCD into two squares and two nonsquare rectangles. The sum of the areas of the two squares is 910\frac{9}{10} of the area of square ABCD.ABCD. Find AEEB+EBAE.\frac{AE}{EB} + \frac{EB}{AE}.

Answer: 18
Solution:

Let AE=xAE = x and EB=y,EB = y, so the square has side x+yx + y and the two smaller squares have sides xx and y.y. The condition says x2+y2=910(x+y)2.x^2 + y^2 = \frac{9}{10}(x + y)^2. Multiplying by 1010 and expanding, 10x2+10y2=9x2+18xy+9y2,10x^2 + 10y^2 = 9x^2 + 18xy + 9y^2, so x2+y2=18xy.x^2 + y^2 = 18xy.

Dividing by xyxy gives AEEB+EBAE=xy+yx=x2+y2xy=18.\frac{AE}{EB} + \frac{EB}{AE} = \frac{x}{y} + \frac{y}{x} = \frac{x^2 + y^2}{xy} = 18.

4.

In the array of 1313 squares shown below, 88 squares are colored red, and the remaining 55 squares are colored blue. If one of all possible such colorings is chosen at random, the probability that the chosen colored array appears the same when rotated 9090^\circ around the central square is 1n,\frac{1}{n}, where nn is a positive integer. Find n.n.

Answer: 429

Difficulty rating: 2300

Solution:

The rotation cycles the four L-shaped arms, so a symmetric coloring colors all four arms identically, and the 1212 outer squares contain 44 copies of whatever the arm shows. The number of red squares among the outer twelve is therefore a multiple of 4.4. Since there are 88 red squares in all, the center must be blue and each arm must contain exactly 22 red squares and 11 blue square.

The blue square within the arm can be chosen in 33 ways, so exactly 33 of the (135)=1287\binom{13}{5} = 1287 equally likely colorings are symmetric. The probability is 31287=1429,\frac{3}{1287} = \frac{1}{429}, so n=429.n = 429.

5.

The real root of the equation 8x33x23x1=08x^3 - 3x^2 - 3x - 1 = 0 can be written in the form a3+b3+1c,\frac{\sqrt[3]{a} + \sqrt[3]{b} + 1}{c}, where a,a, b,b, and cc are positive integers. Find a+b+c.a + b + c.

Answer: 98
Solution:

Rewrite the equation as 9x3=x3+3x2+3x+1=(x+1)3.9x^3 = x^3 + 3x^2 + 3x + 1 = (x + 1)^3. Taking real cube roots, 93x=x+1,\sqrt[3]{9}\,x = x + 1, so x=1931.x = \frac{1}{\sqrt[3]{9} - 1}.

Multiply numerator and denominator by 813+93+1;\sqrt[3]{81} + \sqrt[3]{9} + 1; the denominator becomes (93)31=8,(\sqrt[3]{9})^3 - 1 = 8, so x=813+93+18.x = \frac{\sqrt[3]{81} + \sqrt[3]{9} + 1}{8}. Thus a+b+c=81+9+8=98.a + b + c = 81 + 9 + 8 = 98.

6.

Melinda has three empty boxes and 1212 textbooks, three of which are mathematics textbooks. One box will hold any three of her textbooks, one will hold any four of her textbooks, and one will hold any five of her textbooks. If Melinda packs her textbooks into these boxes in random order, the probability that all three mathematics textbooks end up in the same box can be written as mn,\frac{m}{n}, where mm and nn are relatively prime positive integers. Find m+n.m + n.

Answer: 47

Difficulty rating: 2390

Solution:

Focus on one box at a time. The box of kk books receives a uniformly random kk-subset of the 1212 books, so the probability that it contains all three math books is (9k3)/(12k).\binom{9}{k-3}\big/\binom{12}{k}. For k=3,4,5k = 3, 4, 5 this gives 1220,\frac{1}{220}, 9495=155,\frac{9}{495} = \frac{1}{55}, and 36792=122.\frac{36}{792} = \frac{1}{22}.

The events are disjoint, so the total probability is 1220+155+122=1+4+10220=15220=344,\frac{1}{220} + \frac{1}{55} + \frac{1}{22} = \frac{1 + 4 + 10}{220} = \frac{15}{220} = \frac{3}{44}, and m+n=3+44=47.m + n = 3 + 44 = 47.

7.

A rectangular box has width 1212 inches, length 1616 inches, and height mn\frac{m}{n} inches, where mm and nn are relatively prime positive integers. Three faces of the box meet at a corner of the box. The center points of those three faces are the vertices of a triangle with an area of 3030 square inches. Find m+n.m + n.

Answer: 41

Difficulty rating: 2560

Solution:

Let the height be hh and place the corner at the origin, so the box is [0,12]×[0,16]×[0,h].[0,12] \times [0,16] \times [0,h]. The three faces meeting at the origin have centers P=(6,8,0),P = (6, 8, 0), Q=(0,8,h2),Q = \left(0, 8, \tfrac{h}{2}\right), and R=(6,0,h2).R = \left(6, 0, \tfrac{h}{2}\right).

Then PQ=(6,0,h2)\overrightarrow{PQ} = \left(-6, 0, \tfrac{h}{2}\right) and PR=(0,8,h2),\overrightarrow{PR} = \left(0, -8, \tfrac{h}{2}\right), whose cross product is (4h,3h,48).(4h, 3h, 48). The area is 1216h2+9h2+482=1225h2+2304=30,\frac{1}{2}\sqrt{16h^2 + 9h^2 + 48^2} = \frac{1}{2}\sqrt{25h^2 + 2304} = 30, so 25h2=36002304=129625h^2 = 3600 - 2304 = 1296 and h=365.h = \frac{36}{5}.

Therefore m+n=36+5=41.m + n = 36 + 5 = 41.

8.

The domain of the function f(x)=arcsin(logm(nx))f(x) = \arcsin(\log_m(nx)) is a closed interval of length 12013,\frac{1}{2013}, where mm and nn are positive integers and m>1.m \gt 1. Find the remainder when the smallest possible sum m+nm + n is divided by 1000.1000.

Answer: 371

Difficulty rating: 2560

Solution:

The function is defined when 1logm(nx)1,-1 \le \log_m(nx) \le 1, that is 1mnxm,\frac{1}{m} \le nx \le m, so the domain is [1mn,mn],\left[\frac{1}{mn}, \frac{m}{n}\right], with length mn1mn=m21mn=12013.\frac{m}{n} - \frac{1}{mn} = \frac{m^2 - 1}{mn} = \frac{1}{2013}. Hence n=2013(m21)m.n = \frac{2013(m^2 - 1)}{m}. Since mm is relatively prime to m21,m^2 - 1, mm must divide 2013=31161.2013 = 3 \cdot 11 \cdot 61.

Because n2013m,n \approx 2013m, the sum m+nm + n grows with m,m, so take the smallest factor m=3:m = 3: then n=201383=5368n = \frac{2013 \cdot 8}{3} = 5368 and m+n=5371.m + n = 5371.

The remainder upon division by 10001000 is 371.371.

9.

A paper equilateral triangle ABCABC has side length 12.12. The paper triangle is folded so that vertex AA touches a point on side BC\overline{BC} a distance 99 from point B.B. The length of the line segment along which the triangle is folded can be written as mpn,\frac{m\sqrt{p}}{n}, where m,m, n,n, and pp are positive integers, mm and nn are relatively prime, and pp is not divisible by the square of any prime. Find m+n+p.m + n + p.

Answer: 113

Difficulty rating: 2920

Solution:

Let AA' be the landing point, with BA=9BA' = 9 and CA=3,CA' = 3, and let the crease meet AB\overline{AB} at PP and AC\overline{AC} at Q.Q. Folding preserves distances, so PA=PA=xPA' = PA = x and QA=QA=y.QA' = QA = y. In triangle PBA,PBA', with PB=12xPB = 12 - x and B=60,\angle B = 60^\circ, the law of cosines gives x2=(12x)2+819(12x),x^2 = (12 - x)^2 + 81 - 9(12 - x), which simplifies to 15x=117,15x = 117, so x=395.x = \frac{39}{5}. Similarly, in triangle QCA,QCA', y2=(12y)2+93(12y)y^2 = (12 - y)^2 + 9 - 3(12 - y) gives 21y=117,21y = 117, so y=397.y = \frac{39}{7}.

Finally, in triangle APQAPQ with A=60,\angle A = 60^\circ, PQ2=x2+y2xy=392(125+149135)=39249+25351225=3931225,PQ^2 = x^2 + y^2 - xy = 39^2\left(\frac{1}{25} + \frac{1}{49} - \frac{1}{35}\right) = 39^2 \cdot \frac{49 + 25 - 35}{1225} = \frac{39^3}{1225}, so PQ=393935.PQ = \frac{39\sqrt{39}}{35}. Thus m+n+p=39+35+39=113.m + n + p = 39 + 35 + 39 = 113.

10.

There are nonzero integers a,a, b,b, r,r, and ss such that the complex number r+sir + si is a zero of the polynomial P(x)=x3ax2+bx65.P(x) = x^3 - ax^2 + bx - 65. For each possible combination of aa and b,b, let pa,bp_{a,b} be the sum of the zeros of P(x).P(x). Find the sum of the pa,bp_{a,b}'s for all possible combinations of aa and b.b.

Answer: 80

Difficulty rating: 2710

Solution:

Since PP has real coefficients, rsir - si is also a zero, and the third zero qq is real. The product of the zeros is q(r2+s2)=65,q(r^2 + s^2) = 65, so qq is a nonzero integer and r2+s2r^2 + s^2 is a factor of 65.65. With r,sr, s nonzero, the possibilities are r2+s2=5=12+22r^2 + s^2 = 5 = 1^2 + 2^2 (with q=13q = 13), 13=22+3213 = 2^2 + 3^2 (with q=5q = 5), and 65=12+82=42+7265 = 1^2 + 8^2 = 4^2 + 7^2 (with q=1q = 1).

For each representation {u,v},\{u, v\}, the zero r+sir + si can have r=±ur = \pm u or ±v,\pm v, giving 44 distinct polynomials (the sign of ss changes nothing). The sum of the zeros is pa,b=q+2r,p_{a,b} = q + 2r, and over the four choices the 2r2r terms cancel, leaving 4q4q from each representation.

The total is 413+45+41+41=80.4 \cdot 13 + 4 \cdot 5 + 4 \cdot 1 + 4 \cdot 1 = 80.

11.

Ms. Math's kindergarten class has 1616 registered students. The classroom has a very large number, N,N, of play blocks which satisfies the conditions:

• If 16,16, 15,15, or 1414 students are present in the class, then in each case all the blocks can be distributed in equal numbers to each student, and

• There are three integers 0<x<y<z<140 \lt x \lt y \lt z \lt 14 such that when x,x, y,y, or zz students are present and the blocks are distributed in equal numbers to each student, there are exactly three blocks left over.

Find the sum of the distinct prime divisors of the least possible value of NN satisfying the above conditions.

Answer: 148
Solution:

Divisibility by 16,16, 15,15, and 1414 means N=1680mN = 1680m where 1680=lcm(14,15,16)=24357.1680 = \operatorname{lcm}(14, 15, 16) = 2^4 \cdot 3 \cdot 5 \cdot 7. Every positive integer less than 1414 divides 16801680 except 9,9, 11,11, and 13,13, and a divisor of NN leaves remainder 0,0, not 3.3. So necessarily {x,y,z}={9,11,13},\{x, y, z\} = \{9, 11, 13\}, and we need 1680m31680m \equiv 3 modulo each of 9,9, 11,11, 13.13.

Since 16806(mod9),1680 \equiv 6 \pmod 9, the first congruence is 6m3(mod9),6m \equiv 3 \pmod 9, i.e. m2(mod3).m \equiv 2 \pmod 3. Since 16808(mod11),1680 \equiv 8 \pmod{11}, we need 8m3(mod11),8m \equiv 3 \pmod{11}, i.e. m10(mod11).m \equiv 10 \pmod{11}. Since 16803(mod13),1680 \equiv 3 \pmod{13}, we need m1(mod13).m \equiv 1 \pmod{13}. By the Chinese remainder theorem these combine to m131(mod429),m \equiv 131 \pmod{429}, so the least mm is 131.131.

Then N=1680131=24357131,N = 1680 \cdot 131 = 2^4 \cdot 3 \cdot 5 \cdot 7 \cdot 131, and since 131131 is prime, the sum of the distinct prime divisors is 2+3+5+7+131=148.2 + 3 + 5 + 7 + 131 = 148.

12.

Let PQR\triangle PQR be a triangle with P=75\angle P = 75^\circ and Q=60.\angle Q = 60^\circ. A regular hexagon ABCDEFABCDEF with side length 11 is drawn inside PQR\triangle PQR so that side AB\overline{AB} lies on PQ,\overline{PQ}, side CD\overline{CD} lies on QR,\overline{QR}, and one of the remaining vertices lies on RP.\overline{RP}. There are positive integers a,a, b,b, c,c, and dd such that the area of PQR\triangle PQR can be expressed in the form a+bcd,\frac{a + b\sqrt{c}}{d}, where aa and dd are relatively prime, and cc is not divisible by the square of any prime. Find a+b+c+d.a + b + c + d.

Answer: 21

Difficulty rating: 2990

Solution:

Note R=45.\angle R = 45^\circ. Because the hexagon's interior angles are 120,120^\circ, segments BC\overline{BC} cut off a corner triangle at QQ with two 6060^\circ base angles, so triangle BQCBQC is equilateral and QB=QC=1.QB = QC = 1. Put QQ at the origin with QRQR along the positive xx-axis. Then C=(1,0),C = (1, 0), D=(2,0),D = (2, 0), and the hexagon's vertices are B=(12,32),B = \left(\tfrac{1}{2}, \tfrac{\sqrt{3}}{2}\right), A=(1,3),A = (1, \sqrt{3}), F=(2,3),F = (2, \sqrt{3}), E=(52,32).E = \left(\tfrac{5}{2}, \tfrac{\sqrt{3}}{2}\right).

Since R=45,\angle R = 45^\circ, line RPRP has slope 1.-1. If it passed through E,E, it would be x+y=5+32,x + y = \tfrac{5 + \sqrt{3}}{2}, which puts FF (with x+y=2+3x + y = 2 + \sqrt{3}) outside the triangle; so the vertex on RP\overline{RP} is F,F, and RPRP is the line x+y=2+3.x + y = 2 + \sqrt{3}. It meets the xx-axis at R=(2+3, 0)R = (2 + \sqrt{3},\ 0) and the line y=3xy = \sqrt{3}\,x (line QPQP) where x(1+3)=2+3,x(1 + \sqrt{3}) = 2 + \sqrt{3}, giving PP height y=3(2+3)1+3=3+32.y = \frac{\sqrt{3}(2 + \sqrt{3})}{1 + \sqrt{3}} = \frac{3 + \sqrt{3}}{2}.

The area is 12QRy=12(2+3)3+32=9+534,\frac{1}{2} \cdot QR \cdot y = \frac{1}{2}(2 + \sqrt{3}) \cdot \frac{3 + \sqrt{3}}{2} = \frac{9 + 5\sqrt{3}}{4}, so a+b+c+d=9+5+3+4=21.a + b + c + d = 9 + 5 + 3 + 4 = 21.

13.

Triangle AB0C0AB_0C_0 has side lengths AB0=12,AB_0 = 12, B0C0=17,B_0C_0 = 17, and C0A=25.C_0A = 25. For each positive integer n,n, points BnB_n and CnC_n are located on ABn1\overline{AB_{n-1}} and ACn1,\overline{AC_{n-1}}, respectively, creating three similar triangles ABnCnBn1CnCn1ABn1Cn1.\triangle AB_nC_n \sim \triangle B_{n-1}C_nC_{n-1} \sim \triangle AB_{n-1}C_{n-1}. The area of the union of all triangles Bn1CnBnB_{n-1}C_nB_n for n1n \ge 1 can be expressed as pq,\frac{p}{q}, where pp and qq are relatively prime positive integers. Find q.q.

Answer: 961
Solution:

By Heron's formula with s=27,s = 27, the area of AB0C0\triangle AB_0C_0 is 2715102=90.\sqrt{27 \cdot 15 \cdot 10 \cdot 2} = 90. In the similarity B0C1C0AB0C0,\triangle B_0C_1C_0 \sim \triangle AB_0C_0, side B0C0B_0C_0 corresponds to AC0,AC_0, so the ratio is r=1725,r = \frac{17}{25}, and C1C0C_1C_0 (corresponding to B0C0B_0C_0) equals 17r.17r. Hence AC1AC0=2517r25=1r2,\frac{AC_1}{AC_0} = \frac{25 - 17r}{25} = 1 - r^2, which is the similarity ratio of AB1C1\triangle AB_1C_1 to AB0C0.\triangle AB_0C_0.

Segments B1C1\overline{B_1C_1} and B0C1\overline{B_0C_1} split AB0C0\triangle AB_0C_0 into the three pieces, so [B0C1B1]=90(1r2(1r2)2)=90r2(1r2).[B_0C_1B_1] = 90\left(1 - r^2 - (1 - r^2)^2\right) = 90\,r^2(1 - r^2). Each successive stage repeats the construction inside ABnCn,\triangle AB_nC_n, scaling all areas by (1r2)2,(1 - r^2)^2, and the triangles Bn1CnBnB_{n-1}C_nB_n have disjoint interiors.

The union's area is the geometric series 90r2(1r2)1(1r2)2=90(1r2)2r2=90336/625961/625=90336961.\frac{90\,r^2(1 - r^2)}{1 - (1 - r^2)^2} = \frac{90(1 - r^2)}{2 - r^2} = 90 \cdot \frac{336/625}{961/625} = \frac{90 \cdot 336}{961}. Since 961=312961 = 31^2 shares no factor with 90336=30240,90 \cdot 336 = 30240, the answer is q=961.q = 961.

14.

For πθ<2π,\pi \le \theta \lt 2\pi, let P=12cosθ14sin2θ18cos3θ+116sin4θ+132cos5θ164sin6θ1128cos7θ+P = \frac{1}{2}\cos\theta - \frac{1}{4}\sin 2\theta - \frac{1}{8}\cos 3\theta + \frac{1}{16}\sin 4\theta + \frac{1}{32}\cos 5\theta - \frac{1}{64}\sin 6\theta - \frac{1}{128}\cos 7\theta + \ldots and Q=112sinθ14cos2θ+18sin3θ+116cos4θ132sin5θ164cos6θ+1128sin7θ+Q = 1 - \frac{1}{2}\sin\theta - \frac{1}{4}\cos 2\theta + \frac{1}{8}\sin 3\theta + \frac{1}{16}\cos 4\theta - \frac{1}{32}\sin 5\theta - \frac{1}{64}\cos 6\theta + \frac{1}{128}\sin 7\theta + \ldots so that PQ=227.\frac{P}{Q} = \frac{2\sqrt{2}}{7}. Then sinθ=mn\sin\theta = -\frac{m}{n} where mm and nn are relatively prime positive integers. Find m+n.m + n.

Answer: 36
Solution:

The signs and the alternation between sines and cosines suggest powers of i:i: indeed Q+iP=1+12ieiθ+14i2e2iθ+18i3e3iθ+=11ieiθ2=22ieiθ.Q + iP = 1 + \frac{1}{2}ie^{i\theta} + \frac{1}{4}i^2e^{2i\theta} + \frac{1}{8}i^3e^{3i\theta} + \cdots = \frac{1}{1 - \frac{ie^{i\theta}}{2}} = \frac{2}{2 - ie^{i\theta}}. Since 2ieiθ=(2+sinθ)icosθ,2 - ie^{i\theta} = (2 + \sin\theta) - i\cos\theta, multiplying by the conjugate gives Q+iP=2(2+sinθ)+2icosθ5+4sinθ,Q + iP = \frac{2(2 + \sin\theta) + 2i\cos\theta}{5 + 4\sin\theta}, so PQ=cosθ2+sinθ.\frac{P}{Q} = \frac{\cos\theta}{2 + \sin\theta}.

Setting cosθ2+sinθ=227\frac{\cos\theta}{2 + \sin\theta} = \frac{2\sqrt{2}}{7} and squaring, 49(1sin2θ)=8(2+sinθ)2,49(1 - \sin^2\theta) = 8(2 + \sin\theta)^2, which rearranges to 57sin2θ+32sinθ17=(3sinθ1)(19sinθ+17)=0.57\sin^2\theta + 32\sin\theta - 17 = (3\sin\theta - 1)(19\sin\theta + 17) = 0.

Since πθ<2π\pi \le \theta \lt 2\pi forces sinθ0,\sin\theta \le 0, we get sinθ=1719\sin\theta = -\frac{17}{19} (and then cosθ=6219>0,\cos\theta = \frac{6\sqrt{2}}{19} \gt 0, consistent with the positive ratio). Thus m+n=17+19=36.m + n = 17 + 19 = 36.

15.

Let NN be the number of ordered triples (A,B,C)(A, B, C) of integers satisfying the conditions

0A<B<C99,0 \le A \lt B \lt C \le 99,

• there exist integers a,a, b,b, and c,c, and prime pp where 0b<a<c<p,0 \le b \lt a \lt c \lt p,

pp divides Aa,A - a, Bb,B - b, and Cc,C - c, and

• each ordered triple (A,B,C)(A, B, C) and each ordered triple (b,a,c)(b, a, c) form arithmetic sequences.

Find N.N.

Answer: 272
Solution:

Let dd be the common difference of (b,a,c),(b, a, c), so ab=ca=d>0a - b = c - a = d \gt 0 and c=b+2d<p,c = b + 2d \lt p, whence 0<2d<p.0 \lt 2d \lt p. Let D>0D \gt 0 be the common difference of (A,B,C).(A, B, C). Reducing mod p,p, we get D=BAba=dD = B - A \equiv b - a = -d and D=CBcb=2d,D = C - B \equiv c - b = 2d, so p3d.p \mid 3d. Since 0<d<p,0 \lt d \lt p, the prime pp cannot divide d,d, so p=3;p = 3; then 2d<32d \lt 3 gives d=1d = 1 and (b,a,c)=(0,1,2).(b, a, c) = (0, 1, 2).

So the valid triples are exactly the increasing arithmetic progressions in [0,99][0, 99] with A1,A \equiv 1, B0,B \equiv 0, C2(mod3).C \equiv 2 \pmod 3. Write A=1+3jA = 1 + 3j with j0;j \ge 0; the difference satisfies D12(mod3),D \equiv -1 \equiv 2 \pmod 3, so D=2+3kD = 2 + 3k with k0.k \ge 0. The constraint is C=A+2D=5+3j+6k99,C = A + 2D = 5 + 3j + 6k \le 99, i.e. j+2k31,j + 2k \le 31, and every such pair (j,k)(j, k) works.

For each k=0,1,,15k = 0, 1, \ldots, 15 there are 322k32 - 2k choices of j,j, so N=k=015(322k)=1632215162=512240=272.N = \sum_{k=0}^{15} (32 - 2k) = 16 \cdot 32 - 2 \cdot \frac{15 \cdot 16}{2} = 512 - 240 = 272.