show that among any group of five (not necessary consecutive
) integers, there are two with the same remainder when
divided by 4.



show that among any group of five (not necessary consecutive ) integers, there are two with the sam..

Answer / lalala

generalized pigeon principle: If N objects are placed into k
boxes, then there is at least one box containing at least (ceiling) N/k objects.

let k = 4 ;
find N:

N/4 = 2 , N= 5, in order to get the answer 2..

Is This Answer Correct ?    17 Yes 19 No

Post New Answer

More C++ General Interview Questions

What do you mean by funtion prototype?

0 Answers  


Why is c++ is better than c?

0 Answers  


Why is c++ so fast?

0 Answers  


How to detect memory leaks in c++

1 Answers   Mphasis,


What is the difference between "overloading" and "overridding"?

3 Answers  


What are raw sockets, where they are efficient?

2 Answers   Symphony,


Can I learn c++ in a week?

0 Answers  


What are c++ data types?

0 Answers  


What is c++ good for?

0 Answers  


Write about a nested class and mention its use?

0 Answers  


What is the most common mistake on c++ and oo projects?

0 Answers  


Discussion on error handling of C++ .

0 Answers  


Categories