Exercise in discrete mathematics fill in the blanks 
among 400 persons
.... have the same birthday                       Answer : At least 2 
.... were born on same day of week             Answer : At least 58 
....were born in the same month          Answer : At least 34 
But I don't know how my teacher obtained the answers. Can someone help ?
 A: These are all solved by some variation on the Pigeonhole Principle, which says that any time you have "more pigeons than holes", at least two pigeons must occupy the same hole.
The helpful generalization would be that if you have strictly more than $n$ times as many pigeons as holes, some hole must have $n+1$ pigeons, etc. 
A: Imagine you have 365 folders, one for each day of the year. The number of people in each folder is the number of people born that day. If you have 400 people to put in those folders, worst case scenario : you put 1 in each folder, leaving you with 35, so there will be at least a folder with 2 people in it, but you can arrange that no folder has more than $2$.
Therefore there will be at least 2 people with the same birthday
Same with the days of the week, with 7 folders. With even repartition, each folder will have 57 people in it, and one will have 58. Thus the result.
Same with the months with 12 folders. With even repartition, each folder will have 33 people in it, and at least one will have 34 or more. Thus the result.
EDIT :
Those are indeed applications of the pigeonhole principle. I however think that a good way to see this is the following theorem :
$$\text{The maximum is larger than the average.} $$
Since out of 400 people an average of $400/365$ is born each day, the maximum is larger than that, and thus is at least 2. Therefore there is at least one day where 2 people are born.
