Computer Science 60
Principles of Computer Science
Spring 2004
NIM Bonus Problem
Due anytime before the last day of classes
This is a totally optional 15 point bonus problem.
You may use any language that
we have covered in this course. If you wish to use a different
language, please check with Ran or Zach first.
Your NIM program should have the following features:
- The user is asked to specify the number of stacks of
coins and then the number of coins in each stack.
- The user is asked to specify who will be Player 1.
- The program uses the optimal strategy described in class.
Of the 15 points for this assignment, 10 points will be for correct
functionality and 5 points for elegance of implementation. Please
submit your program directly to Ran or Zach.
Last modified February 2004 by Ran Libeskind-Hadas