Rosetta Problems

Nearest position

https://marisaoj.com/problem/334