harbor run -t openthoughts/tasktrove-exp-rpt-taco-v2-taco-5856harbor download openthoughts/tasktrove-exp-rpt-taco-v2-taco-5856Rakesh is embarking on his first solo adventure across the city and is equipped with a GPS tracker that communicates his movements to his family. The city is modeled as a grid where Rakesh moves according to specific commands. Your task is to determine Rakesh's final position after executing his movement commands.
Rakesh can move in the following directions based on the encoded letters:
Rakesh starts at position (0, 0) and aims to reach his relative's house located at (Rx, Ry).
Given the sequence of Rakesh's movements, determine if he ends up:
For each test case:
For each test case, print the result in the format:
Case i: <result>
Where i is the 1-indexed test case number, and <result> can be one of the following:
Note: Do not include quotation marks in the output.
2
20 20
4 5
13
LLUUUUURRRRRR
10 10
3 4
7
UDUDDRR
Case 1: REACHED
Case 2: DANGER
The solution for this coding task should be placed in the /app/ directory.
Important: place your implementation at /app/solution.py so the verifier can run it.