show that among any group of five (not necessary consecutive
) integers, there are two with the same remainder when
divided by 4.
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 |
How to allocate memory dynamically for a reference?
What is the use of endl?
What is a try block?
Do vectors start at 0?
Write a function which takes a character array as input and reverses it in place.
2 Answers Lehman Brothers, Vision Infotech,
what is Loop function? What are different types of Loops?
What is an adaptor class or wrapper class in c++?
What is the Difference between "C structure" and "C++ structure"?
Write a program to interchange 2 variables without using the third one.
What is the default access level?
What is the purpose of extern storage specifier?
What is the difference between a definition and a declaration?