A general counts the number of surviving soldiers of a battle by aligning them successively in rows of certain sizes. Each time, he counts the number of remaining soldiers who failed to fill a row. The general initially had 1200 soldiers before the battle; after the battle
How many soldiers survived the battle?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
i used same concept
bruteforce?
Log in to reply
not really , the method above has a common difference of 110.
just find the first multiply of 11 that end with 3 and increase/decrease it by 110 consecutively.
although there is still some brute force tho...
Same concept :)
tricky one.
I to used the same concept.. but started from 33 and ended up with 1023.
first start with the given condition that it gives same remainder with 5 & 6,which means the number is of the form 30n+3.It is also given that it gives remainder 1 when divided by 7.Now seperating 30n+2 into 28n+2n+3 we can say that 2n+3 should be equal to 7n+1 where n is odd.this gives that the least number which fulfil the previous conditions simultaneously is 183 and the remaining numbers should be in a form 183+210n wich in turn is equal to 176+7+209n+n this will divisible by 11 only when 7+n=11k ,so for k=1,n=4.Now placing the value of n into our previous number we get-183+210*4=1023,which is fulfiling all the given condition.
11-7 = 4. So, to get 1 (mod 7), the smallest integer that is multiple of 4 is 8, that is 2 * 4 = 8 = 1 (mod 7).
So 2 * 11= 22 = 0 (mod 11) = 1 (mod 7)...<....>
22 = 4 (mod 6)...Next number to be added should be7 * 11 = 77 = 5 (mod 6)....
So 22+77 = 99 = 3 (mod 6).....
99 is good for 11, 7, 6.....
99 = 4 (mod 5)..<....>
Next number to be added should be 11 * 7 *6 = 462 = 2 (mod 5)..... So 99 + 462 = 571 = 4 + 2 (mod 5) = 1 (mod 5)
To get 3 (mod 5), we need to add 462 = 2 (mod 5). So 571 + 462 = 1023 = 3 (mod 5).
1023.
I didnt get it... but i cracked it using some other method.. bit lengthy though.
Same Concept :)
I made a small C++ program that checks every number between 11 and 1200 and if it is divisible by these 4 numbers, it will print it. It gave me the answer in 3 seconds ^_^
If we have bcd + acd + abd + abc, then in mod a, all but the first term become irrelevant in finding the value it is congruent to. The same applies to mod b, c, and d.
Thus, in mod 5, we have 6 7 11*x, where x is a number that makes the expression be congruent to 3 mod 5. x = 4 satisfies this constraint.
For mod 6, we have 5 7 11*3.
For mod 7, we have 5 6 11. (x = 1)
For mod 11, we have 5 6 7*11 (since it is congruent to 0 mod 11, all terms must be divisible by 11).
Thus, the sum of these is 5643. However, we can look at it in mod 5 6 7*11 (mod 2310). This is because the lcm of 5,6,7,11 is 2310 and adding/subtracting 2310 will not change the remainder when dividing by any of the original modulos.
Subtracting 2*2310 gives us 1023, which is the only answer in the range 0<answer<1200. Thus, our answer is 1023.
Chinese Remainder Theorem :l lenghty tho ~
x mod 5=3 x mod 6=3 implies x mod 30=3.....(1) x mod 7=1.............(2) x mod 11=0...........(3) so from (1) 30a+3 is number 30a+3 mod 11=0 it implies 30(11m+1)+3 =330m+33 330m+33 mod 7=1 (from 2) 330(7y+3)+33 2310y+1023 is required value put y=0 for the above condition to get value less than 1200 soliders it gives 1023 as final answer
using Chinese remainder theorem
x = 3 * 462 * 3 + 3 * 385 * 1 + 1 * 330 * 1 + 0 * 210 * 1 = 5643,
N = 5 * 6 * 7 * 11 = 2310
now, 5643 - 2 * 2310 = 1023
hence, the answer is 1023
33, 143, 253, 363, 473, 583, 693, 803, 913, 1023, 1133.... all these positive real factors of 11 till 1200 and only 1023 satisfies the given conditions.
Let there be x survivors. From the first 2 conditions, x − 3 is a multiple of both 5 and 6, which is true if and only if x − 3 is a multiple of 30. Therefore, x can be represented as 3 0 k + 3 for some integer k. We take this mod 11 to give that 1 0 k + 1 is a multiple of 11. This is clearly true if k = 1 and it is therefore true if and only if k can be represented as 1 + 1 1 r for some integer r . Therefore, x can be represented as 3 0 ( 1 + 1 1 r ) + 3 = 3 3 + 3 3 0 r for some integer r .
We also have that x − 1 is divisible by 7, so we take x − 1 = 3 2 + 3 3 0 r mod 7 to get 4 + r ≡ 0 (mod 7). The smallest positive r that satisfies this is 3 (we can't have negative survivors, so r is positive. Also, if there is a solution when r is not minimal, there must also be a solution when r is minimal because the only restriction on the number of survivors other than the fact that it is positive is an upper bound.)
Plugging in r = 3 gives x = 3 3 + 3 3 0 × 3 = 1 0 2 3 .
From first two conditions the number is 30x+3 From third condition we can say that 30x+2 is divisible by 7 now, 30x+2 = 28x + 2x +2 so, 2x+2 is divisible by 7 where minimum integer value of x is 6 meeting first three conditions, we get the number = 30 6+3 = 183 now, it is obvious that we have to maintain the value of x always incremented by 7, which means that for meeting the forth condition we set the number to 183+210y which is divisible by 11 183+210y = (176+209y)+(7+y) hence, y = 4 so, the number = 183+210 4 = 1023
Problem Loading...
Note Loading...
Set Loading...
The units digit should either be 8 or 3 from condition 1. From condition 2, the number should be odd, hence units digit become 3. Now starting from 1200, we need numbers divisible by 11 and ending in 3. Check 1133. This does not give remainder 1 when divided by 7. Check 1023. This satisfies all conditions. Ans = 1023