English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

There is one answer between 1000 and 2000, and it is 1679. Here's how I did it:

I wrote a program that iterates i from 1000 to 2000. For each value of i, the program iterates j from 2 to 8. If mod(i,j) doesn't equal (j-1), the program sets a failure flag. If any value of i passes all the tests, the failure flag isn't set, and it prints out the number.

This works because the modulus function mod(i,j) gives you the remainder you'd get dividing i by j.

The numbers that pass this test are all of the form (840*n - 1), where n = 1, 2, 3...

839, 1679, 2519, 3359, et cetera.

2007-06-26 19:38:36 · answer #1 · answered by lithiumdeuteride 7 · 0 0

It is not 1679 from previous answers

1679/7 = (239 * 7) + 6 this remainder is not in {1,2,3,4,5}
______________________________________
1019,1079, 1103, 1109, 1139, 1187, 1199, 1259, 1271, 1313, 1319, 1439, 1499, 1523, 1529, 1559, 1607, 1619, 1679, 1691, 1733, 1739, 1859, 1919, 1943, 1949, 1979

When divided by 2,3,4,5,6,7 and 8 leaves remainders 1,2,3,4,5 .

If there is a typo in the question such that the question should be A number lying between 1000 and 2000 is such that on division by 2,3,4,5,6,7 and 8 leaves remainders 1,2,3,4,5,6,7 has only one solution: 1679

Peter

2007-06-27 03:31:42 · answer #2 · answered by PeterVincent 2 · 0 0

find the LCD of 2,3,4,5,6,7,8
which will be 840
since it is not between 1000 and 2000
*2
which will be 1680
subtract 1
1679

2007-06-27 03:02:15 · answer #3 · answered by BJ 2 · 0 0

fedest.com, questions and answers