The first input line has an integer qqq: the number of queries. After this, there are qqq lines that describe the queries. Each line has an integer kkk: a 111-indexed ...
Frodo and Sam need to travel 100 leagues due East from point A to point B. On normal terrain, they can cover 10 leagues per day, and so the journey would take 10 days. However, their path is crossed ...