urgent response neaded

My teacher at senior high has asked for us to hand in a project
Unfortunately, i have no idea, as to how to do it and if i don't i will fail the subject and remain in the same year. So i am in nead of urgent help.
The question is the following:

Benjamin and his friend Locke play the following game: At first they put N pebbles in a box.
• Each player in turn takes from one to K pebbles from the box.
• The player that the box is empty when it comes to his turn loses because he
can not play.
• Benjamin plays first.
Benjamin and Locke will play T rounds. Benjamin takes the game really
seriously and for every round he wants to know from the start if he can win. Help Benjamin to find out which player will win the game in each round if both players play optimally.

Sample inputs and their outputs, ar the following:
Sample input 1:
1
5 3
Sample output 1:

Benjamin

Sample input 2:
2
6 2
10 4

Sample output 2:
Locke
Locke
Urgent help is necessary guys, so that i can get out of this jam
I thank you in advance
Kenith
P.S. if at all possible write the code, in a simplish fashion, so that i can understand it
Do not double-post. It is waste of everybody's time. Other thread: http://www.cplusplus.com/forum/beginner/247962/
Topic archived. No new replies allowed.