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 is the latest c++ version?

0 Answers  


why is iostream::eof inside a loop condition considered wrong?

0 Answers  


How should runtime errors be handled in c++?

0 Answers  


Can char be a number c++?

0 Answers  


Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?

0 Answers  






How can you link a c++ program to c functions?

0 Answers  


What is null and void pointer?

0 Answers  


Write syntax to define friend functions in C++.

0 Answers   HAL,


What do you mean by const correctness?

0 Answers  


What is meant by reference variable in C++?

1 Answers  


write a program that will produce the ff. output. "what fruit will you buy? 1)apple 2)orange 3)mango ENTER CHOICE (1,2 or 3)> HOW MANY WILL YOU BUY?> THAT WILL COST XX.XX

1 Answers  


i want the NIC programmer-B model papaer pattren, iwant the all model papers?

15 Answers   NIC,


Categories