CF120A.Elevator
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
A sky scraper with 1000 floors has been built in the city of N. It has modern superfast elevators to help to travel from one floor to another. Each elevator has two doors, the front one and the back one. If one goes in through the front door, he goes out through the back one and vice versa. The elevator has two rails numbered with numbers 1 and 2. Rail 1 is located to the left of the entrance to the front door (or correspondingly, to the right of the entrance to the back door). Rail 2 is located opposite it, to the right of the entrance to the front door and to the left of the entrance to the back door. We know that each person in the city of N holds at a rail with the strongest hand.
One day a VIP person visited the city and of course, he took a look at the skyscraper and took a ride in the elevator. We know the door through which he entered and the rail he was holding at. Now we need to determine as soon as possible whether he is left-handed or right-handed.
一座拥有1000层的摩天大楼在N市建成。大楼配备了现代化的超高速电梯,以方便人们在各楼层之间通行。每部电梯有两个门:前门和后门。若某人从前门进入,则必从后门走出,反之亦然。电梯配有两条扶手,编号分别为1号和2号。1号扶手位于前门入口的左侧(相应地,位于后门入口的右侧);2号扶手则正对1号扶手,位于前门入口的右侧、后门入口的左侧。已知N市的每个人均用自己最强壮的手握住扶手。
某日,一位VIP人士访问了该市,自然参观了这座摩天大楼并乘坐了电梯。我们已知他进入电梯时所使用的门(前门或后门),以及他所握住的扶手编号(1号或2号)。现在我们需要尽快判断:该VIP人士是左撇子还是右撇子。
输入格式
The first line indicates the door through which the very important person entered the elevator. It contains "front" if the person enters the elevator through the front door and "back" if he entered the elevator through the back door. The second line contains integer a (1 ≤ a ≤ 2) which denotes the number of the rail at which the person was holding.
第一行表示这位非常重要的人物进入电梯的门。若此人从前门进入电梯,则该行为“front”;若此人从后门进入电梯,则该行为“back”。第二行包含一个整数 a(1 ≤ a ≤ 2),表示此人所握扶手的编号。
输出格式
Print character "R" if the VIP is right-handed or "L" if he is left-handed.
如果该VIP是右撇子,则输出字符“R”;如果是左撇子,则输出字符“L”。
输入输出样例
输入#1
front 1
输出#1
L
输入解题思路,AI测评打分。不知道怎么写?