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 avoid a class from instantiation?
Why do we use the using declaration?
A mXn matrix is given and rows and column are sorted as shown below.Write a function that search a desired entered no in the matrix .with minimum complexity 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
what is difference between internet and Internet?
12 Answers College School Exams Tests, Microsoft, MIT, TCS,
Which bit wise operator is suitable for turning off a particular bit in a number?
Does c++ vector allocate memory?
Write a program to calculate the BMI of a person using the formula BMI = weight/height2.
Is map ordered c++?
What happens if an exception is throws from an object's constructor and from object's destructor?
How can you quickly find the number of elements stored in a a) static array b) dynamic array ?
What is the best c++ ide?
How would you use the functions sin(), pow(), sqrt()?