QR_wording

This forum made possible through the generous support of SDN members, donors, and sponsors. Thank you.

datdat

Full Member
10+ Year Member
Joined
Jul 5, 2009
Messages
221
Reaction score
0
w_qr_suj1_17

I don't understand this question which is from kap subject test. could anybody explain it with an example?

Thanks

Members don't see this ad.
 
N is 122. Say m is 11. Start with 122. Is that divisible by 11? No. Is 123? No. Keep going. Eventually 132 is divisible by 11. How many integers did we have to add to 122 to get to 132? We added 10.

Notice that 10 is one less than 11, our value of m.

This is the most extreme case - where the integer we start with is one higher than an integer evenly divisible by m.

If you start with N which divides by m EVENLY, then you need to add another m integers to get to the next number that divides evenly by m.

For example if you have 25 which divides by 5 evenly, you'd need to add another 5 to get to 30, the next number which divides by 5 evenly.

However if you start one higher, such as 26, then in order to reach the next integer which divides evenly by m (here 5), you need to add (m-1). In this case m-1 would be 4.

This will guarantee that you will hit the next integer that evenly divides by m.

Of course N could be 120 and m could be 11 and you only need to add 1... but giving you room for 10 integers guarantees that it will work no matter what N is.
 
Top