Error
|
|
---|---|
@Ibrahim Nash | 5761 |
@blackshadows | 5715 |
@akhayrutdinov | 5111 |
@mb1973 | 4989 |
@Quandray | 4944 |
@saiujwal13083 | 4506 |
@sanjay05 | 3762 |
@marius_valentin_dragoi | 3516 |
@sushant_a | 3459 |
@verma_ji | 3341 |
@KshamaGupta | 3318 |
Complete Leaderboard | |
|
|
@aroranayan999 | 1115 |
@bt8816103042 | 739 |
@thealchemist627 | 456 |
@akashkale117 | 453 |
@shivanandp12345678910 | 453 |
@dalwainazism125 | 453 |
@codeantik | 448 |
@SherlockHolmes3 | 447 |
@SHOAIBVIJAPURE | 430 |
@shalinibhataniya1097 | 408 |
@ShamaKhan1 | 392 |
Complete Leaderboard |
Consider a special family of Engineers and Doctors with following rules :
We can represent the situation using below diagram:
E
/ \
E D
/ \ / \
E D D E
/ \ / \ / \ / \
E D D E D E E D
Given level and position of a person in above ancestor tree, find profession of the person.
Examples:
Input : level = 4, pos = 2
Output : Doctor
Input : level = 3, pos = 4
Output : Engineer
Input:
First line of input contains number of test cases T. Each test case will be of one line. Each test case will have two space separated integers. First input represents Generation and second input represents child number.
Output:
Corresponding to each test case you have to print Doctor or Engineer in new line,based on input.
Example:
Input:
2
4 2
3 4
Output:
Doctor
Engineer
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Yes