Created
June 12, 2020 01:59
-
-
Save sai-sondarkar/91f3d776c479d909f0b5b03c7dbf438b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Akash and Vishal are quite fond of travelling. They mostly travel by railways. They were travelling in a train one day and they got interested in the seating arrangement of their compartment. | |
The compartment looked something like - https://letsupgrade.in/projectIMages/train.jpg | |
So they got interested to know the seat number facing them and the seat type facing them. The seats are denoted as follows : | |
Window Seat : WS | |
Middle Seat : MS | |
Aisle Seat : AS | |
You will be given a seat number, find out the seat number facing you and the seat type, i.e. WS, MS or AS. | |
INPUT | |
First line of input will consist of a single integer T denoting number of test-cases. Each test-case consists of a single integer N denoting the seat-number. | |
OUTPUT | |
For each test case, print the facing seat-number and the seat-type, separated by a single space in a new line. | |
CONSTRAINTS | |
1<=T<=105 | |
1<=N<=108 | |
SAMPLE INPUT | |
2 | |
18 | |
40 | |
SAMPLE OUTPUT | |
19 WS | |
45 AS | |
Author
sai-sondarkar
commented
Jun 12, 2020
First all input will be taken and then for each input result will be displayed or for 1 input output displayed and then another input output will display which way the code must be
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment