Home > Back-end >  Birthday is the same problem
Birthday is the same problem

Time:10-01

In a large class of 180 people, there are two personal birthday the same probability is very big, now give each student's student id, date of birth, and try to find out all the birthday the same student,
Input: the first integer n, said there are n students, n<100, since then each row contains a string and two integers, respectively, said the student's student id (string length is less than 10), and birth month (1 & lt;=m<=12), (1 & lt;=d<=31), student id, month, day are separated with a space,
Output: the birthday is the same in each pair of students, the output of a line, the top two Numbers on and said, followed by all students born in the student number, number, used a space separated between student number and output of all requirements by date to the order of the output after once upon a time, the birthday the same student id, according to the order of the input output,

CodePudding user response:

According to the birthday, then find the same,

CodePudding user response:

A a comparison

CodePudding user response:

Sorted, compare also came out, ha ha
  • Related