show that among any group of five (not necessary consecutive
) integers, there are two with the same remainder when
divided by 4.
Answer Posted / 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 View All Answers
What do you mean by function overriding & function overloading in c++?
How do you clear a map in c++?
How do you decide which integer type to use?
What are single and multiple inheritances in c++?
What is the difference between #define debug 0 and #undef debug?
How would perform Pattern Matching in C++?
Explain the difference between class and struct in c++?
What is the difference between a baller and a reference in C++?
Describe exception handling concept with an example?
Is multimap sorted c++?
write a c++ program to create class student having datamember name,Roll_no,age,and branch intilcization all the member using constructor print the all the details on the screen.
Please explain class & object in c++?
What are stacks?
Define basic type of variable used for a different condition in C++?
What is the extraction operator and what does it do?