All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Additive years (Posted on 2012-08-08) Difficulty: 3 of 5
A year is called an Additive year when the sum of the number formed by the first two digits and the number formed by the last two digits add up to the number formed by the middle two digits. For example, considering the year 1978 we observe that when 19 is added to 78, the result is 97 which is the number formed by the middle two digits.

(i) Determine the total number of Additive years from years 1000 to 9999 inclusively.

(ii) What are the respective first and last Additive years from years 2000 to 2999 inclusively?

(iii) What are the respective first and last Additive years in the period covered under (i)?

No Solution Yet Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 4 of 6 |

FOR yr = 1000 TO 9999
  y1 = yr \ 100
  y3 = yr MOD 100
  y2 = (yr \ 10) MOD 100
  IF y1 + y3 = y2 THEN
     PRINT yr: ct = ct + 1
  END IF
NEXT yr
PRINT ct

finds (plus my annotations):

 1208 Part iiiA solution
 1318
 1428
 1538
 1648
 1758
 1868
 1978
 2307 Part iiA solution
 2417
 2527
 2637
 2747
 2857
 2967 Part iiB solution
 3406
 3516
 3626
 3736
 3846
 3956
 4505
 4615
 4725
 4835
 4945
 5604
 5714
 5824
 5934
 6703
 6813
 6923
 7802
 7912
 8901 Part iiiB solution
 36   Part i solution


  Posted by Charlie on 2012-08-08 12:38:33
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information