What's your ID?

fahimsadi MU Team Practice Contest...
Limits 1s, 512 MB

You must have heard the name of Metropolitan University. As soon as a student get admitted there, the university provides him/her a nine digits ID (e.g. 131-115-100).

If you notice carefully you will find that, this is not just a random number. The very first two digits define the year of admission, and the third digit indicates the term of admission. 1 for Spring, 2 for Summer and 3 for Autumn. Next three digits indicate the name of the department.

  • 115 for CSE
  • 141 for EEE
  • 116 for BBA
  • 117 for LLB
  • 114 for English and
  • 111 for Economics

Rest of the digits indicate the roll number of the student.

For instance, Nasif’s ID is 171-115-249 . Here 171 means his academic year is Spring 2017. 115 means he is a student of CSE and 249 is his class roll.

Now your task is to write a program that prints the name of the department and the academic year of students from given ID numbers.


The first line contains a single integer N (1 ≤ N ≤ 1000).

The next N lines contain N ID numbers in "XXX-XXX-XXX" format.


Print N lines of output with the name of the department and academic year.


CSE Spring 2013
BBA Spring 2017
CSE Summer 2016


Login to submit.


89% Solution Ratio
sarwarITEarliest, Jul '17
MariaFar_45Fastest, 0.0s
sarwarITLightest, 131 kB
bokaifShortest, 193B
Toph uses cookies. By continuing you agree to our Cookie Policy.