Difference between revisions of "2013 AIME I Problems/Problem 2"
Line 17:  Line 17:  
== Solution==  == Solution==  
The number takes a form of <math>5\text{x,y,z}5</math>, in which <math>5x+y+z</math>. Let <math>x</math> and <math>y</math> be arbitrary digits. For each pair of <math>x,y</math>, there are exactly two values of <math>z</math> that satisfy the condition of <math>5x+y+z</math>. Therefore, the answer is <math>10\times10\times2=\boxed{200}</math>  The number takes a form of <math>5\text{x,y,z}5</math>, in which <math>5x+y+z</math>. Let <math>x</math> and <math>y</math> be arbitrary digits. For each pair of <math>x,y</math>, there are exactly two values of <math>z</math> that satisfy the condition of <math>5x+y+z</math>. Therefore, the answer is <math>10\times10\times2=\boxed{200}</math>  
+  
+  This 9line code in Python also gives the answer too.  
+  import math  
+  counter=0  
+  for integer in range(10000,99999):  
+  if str(integer)[4] != '5' or str(integer)[0] != '5':  
+  counter=counter  
+  else:  
+  if math.remainder(int(str(integer)[1]+str(integer)[2]+str(integer)[3]),5)==0:  
+  counter+=1  
+  print(counter)  
==Video Solution==  ==Video Solution== 
Revision as of 01:30, 3 October 2020
Contents
Problem 2
Find the number of fivedigit positive integers, , that satisfy the following conditions:

(a) the number is divisible by

(b) the first and last digits of are equal, and

(c) the sum of the digits of is divisible by
Solution
The number takes a form of , in which . Let and be arbitrary digits. For each pair of , there are exactly two values of that satisfy the condition of . Therefore, the answer is
This 9line code in Python also gives the answer too. import math counter=0 for integer in range(10000,99999):
if str(integer)[4] != '5' or str(integer)[0] != '5': counter=counter else: if math.remainder(int(str(integer)[1]+str(integer)[2]+str(integer)[3]),5)==0: counter+=1
print(counter)
Video Solution
https://www.youtube.com/watch?v=kz3ZX4PT_0 ~Shreyas S
See also
2013 AIME I (Problems • Answer Key • Resources)  
Preceded by Problem 1 
Followed by Problem 3  
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15  
All AIME Problems and Solutions 
The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions.