CodeForces - 546D Soldier and Number Game

NoSuchKey