Bot saves princess

Problem Name:
Bot saves princess
Site:HackerRank
Links:
Tags:
Problem setters: